Commit c2db115e authored by Knic Knic's avatar Knic Knic

fix formatting

parent 2346ccc6
// +build !windows // +build !windows
package containerd package containerd
import ( import (
"os/exec" "os/exec"
"syscall" "syscall"
) )
func addDeathSig(cmd *exec.Cmd) { func addDeathSig(cmd *exec.Cmd) {
// not supported in this OS // not supported in this OS
cmd.SysProcAttr = &syscall.SysProcAttr{ cmd.SysProcAttr = &syscall.SysProcAttr{
Pdeathsig: syscall.SIGKILL, Pdeathsig: syscall.SIGKILL,
} }
} }
package containerd package containerd
import "os/exec" import "os/exec"
func addDeathSig(_ *exec.Cmd) { func addDeathSig(_ *exec.Cmd) {
// not supported in this OS // not supported in this OS
} }
package netpol package netpol
import ( import (
"context" "context"
daemonconfig "github.com/rancher/k3s/pkg/daemons/config" daemonconfig "github.com/rancher/k3s/pkg/daemons/config"
) )
func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error{ func Run(ctx context.Context, nodeConfig *daemonconfig.Node) error {
panic("Netpol is not supported on windows ensure to pass --disable-network-policy") panic("Netpol is not supported on windows ensure to pass --disable-network-policy")
} }
\ No newline at end of file
package syssetup package syssetup
func Configure() {} func Configure() {}
\ No newline at end of file
package rootless package rootless
import ( func Rootless(stateDir string) error {
) panic("Rootless not supported on windows")
}
func Rootless(stateDir string) error {
panic("Rootless not supported on windows")
}
package rootlessports package rootlessports
import ( import (
"context" "context"
coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1" coreClients "github.com/rancher/wrangler-api/pkg/generated/controllers/core/v1"
) )
func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error { func Register(ctx context.Context, serviceController coreClients.ServiceController, httpsPort int) error {
panic("Rootless is not supported on windows") panic("Rootless is not supported on windows")
} }
\ No newline at end of file
// +build !windows // +build !windows
package util package util
import ( import (
"os" "os"
) )
func SetFileModeForPath(name string, mode os.FileMode) error { func SetFileModeForPath(name string, mode os.FileMode) error {
return os.Chmod(name, mode) return os.Chmod(name, mode)
} }
func SetFileModeForFile(file *os.File, mode os.FileMode) error { func SetFileModeForFile(file *os.File, mode os.FileMode) error {
return file.Chmod(mode) return file.Chmod(mode)
} }
package util package util
import ( import (
"os" "os"
) )
func SetFileModeForPath(name string, mode os.FileMode) error { func SetFileModeForPath(name string, mode os.FileMode) error {
return nil return nil
} }
func SetFileModeForFile(file *os.File, mode os.FileMode) error { func SetFileModeForFile(file *os.File, mode os.FileMode) error {
return nil return nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment