fix formatting

pull/1444/head
Knic Knic 2020-02-23 00:48:26 -08:00
parent 2346ccc63f
commit c2db115ec3
8 changed files with 78 additions and 82 deletions

View File

@ -1,15 +1,15 @@
// +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,
} }
} }

View File

@ -1,7 +1,7 @@
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
} }

View File

@ -1,10 +1,10 @@
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")
} }

View File

@ -1,3 +1,3 @@
package syssetup package syssetup
func Configure() {} func Configure() {}

View File

@ -1,9 +1,5 @@
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")
}

View File

@ -1,10 +1,10 @@
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")
} }

View File

@ -1,15 +1,15 @@
// +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)
} }

View File

@ -1,13 +1,13 @@
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
} }