diff --git a/pkg/agent/containerd/command.go b/pkg/agent/containerd/command.go index 07ead8e2a5..d5962f7661 100644 --- a/pkg/agent/containerd/command.go +++ b/pkg/agent/containerd/command.go @@ -1,15 +1,15 @@ -// +build !windows - -package containerd - -import ( - "os/exec" - "syscall" -) - -func addDeathSig(cmd *exec.Cmd) { - // not supported in this OS - cmd.SysProcAttr = &syscall.SysProcAttr{ - Pdeathsig: syscall.SIGKILL, - } -} +// +build !windows + +package containerd + +import ( + "os/exec" + "syscall" +) + +func addDeathSig(cmd *exec.Cmd) { + // not supported in this OS + cmd.SysProcAttr = &syscall.SysProcAttr{ + Pdeathsig: syscall.SIGKILL, + } +} diff --git a/pkg/agent/containerd/command_windows.go b/pkg/agent/containerd/command_windows.go index f0bc94d859..2658ff22f7 100644 --- a/pkg/agent/containerd/command_windows.go +++ b/pkg/agent/containerd/command_windows.go @@ -1,7 +1,7 @@ -package containerd - -import "os/exec" - -func addDeathSig(_ *exec.Cmd) { - // not supported in this OS -} +package containerd + +import "os/exec" + +func addDeathSig(_ *exec.Cmd) { + // not supported in this OS +} diff --git a/pkg/agent/netpol/netpol_windows.go b/pkg/agent/netpol/netpol_windows.go index 177f582e7e..0b67622d45 100644 --- a/pkg/agent/netpol/netpol_windows.go +++ b/pkg/agent/netpol/netpol_windows.go @@ -1,10 +1,10 @@ -package netpol - -import ( - "context" - daemonconfig "github.com/rancher/k3s/pkg/daemons/config" -) - -func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error{ - panic("Netpol is not supported on windows ensure to pass --disable-network-policy") -} \ No newline at end of file +package netpol + +import ( + "context" + daemonconfig "github.com/rancher/k3s/pkg/daemons/config" +) + +func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error { + panic("Netpol is not supported on windows ensure to pass --disable-network-policy") +} diff --git a/pkg/agent/syssetup/setup_windows.go b/pkg/agent/syssetup/setup_windows.go index 5880d44cfb..4053e2a901 100644 --- a/pkg/agent/syssetup/setup_windows.go +++ b/pkg/agent/syssetup/setup_windows.go @@ -1,3 +1,3 @@ -package syssetup - -func Configure() {} \ No newline at end of file +package syssetup + +func Configure() {} diff --git a/pkg/rootless/rootless_windows.go b/pkg/rootless/rootless_windows.go index 91ba40c00c..4431d0ab73 100644 --- a/pkg/rootless/rootless_windows.go +++ b/pkg/rootless/rootless_windows.go @@ -1,9 +1,5 @@ -package rootless - -import ( -) - - -func Rootless(stateDir string) error { - panic("Rootless not supported on windows") -} +package rootless + +func Rootless(stateDir string) error { + panic("Rootless not supported on windows") +} diff --git a/pkg/rootlessports/controller_windows.go b/pkg/rootlessports/controller_windows.go index 819651cf03..0e75c14dc8 100644 --- a/pkg/rootlessports/controller_windows.go +++ b/pkg/rootlessports/controller_windows.go @@ -1,10 +1,10 @@ -package rootlessports - -import ( - "context" - coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1" -) - -func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error { - panic("Rootless is not supported on windows") -} \ No newline at end of file +package rootlessports + +import ( + "context" + coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1" +) + +func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error { + panic("Rootless is not supported on windows") +} diff --git a/pkg/util/file.go b/pkg/util/file.go index 4a8866ad7e..3622c7f41e 100644 --- a/pkg/util/file.go +++ b/pkg/util/file.go @@ -1,15 +1,15 @@ -// +build !windows - -package util - -import ( - "os" -) - -func SetFileModeForPath(name string, mode os.FileMode) error { - return os.Chmod(name, mode) -} - -func SetFileModeForFile(file *os.File, mode os.FileMode) error { - return file.Chmod(mode) -} +// +build !windows + +package util + +import ( + "os" +) + +func SetFileModeForPath(name string, mode os.FileMode) error { + return os.Chmod(name, mode) +} + +func SetFileModeForFile(file *os.File, mode os.FileMode) error { + return file.Chmod(mode) +} diff --git a/pkg/util/file_windows.go b/pkg/util/file_windows.go index 3ca66e756a..2dbc4c98ee 100644 --- a/pkg/util/file_windows.go +++ b/pkg/util/file_windows.go @@ -1,13 +1,13 @@ -package util - -import ( - "os" -) - -func SetFileModeForPath(name string, mode os.FileMode) error { - return nil -} - -func SetFileModeForFile(file *os.File, mode os.FileMode) error { - return nil -} +package util + +import ( + "os" +) + +func SetFileModeForPath(name string, mode os.FileMode) error { + return nil +} + +func SetFileModeForFile(file *os.File, mode os.FileMode) error { + return nil +}