mirror of https://github.com/k3s-io/k3s
fix formatting
parent
2346ccc63f
commit
c2db115ec3
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package syssetup
|
||||
|
||||
func Configure() {}
|
||||
package syssetup
|
||||
|
||||
func Configure() {}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
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")
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue