mirror of https://github.com/k3s-io/k3s
Fix gofmt warnings
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/6150/head
parent
1b806f5fee
commit
ae7d6285b6
|
@ -11,6 +11,7 @@
|
|||
},
|
||||
"run": {
|
||||
"skip-dirs": [
|
||||
"pkg/generated",
|
||||
"build",
|
||||
"contrib",
|
||||
"manifests",
|
||||
|
|
|
@ -83,7 +83,7 @@ func forkIfLoggingOrReaping() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
//reapChildren calls Wait4 whenever SIGCHLD is received
|
||||
// reapChildren calls Wait4 whenever SIGCHLD is received
|
||||
func reapChildren() {
|
||||
sigs := make(chan os.Signal, 1)
|
||||
signal.Notify(sigs, syscall.SIGCHLD)
|
||||
|
|
|
@ -75,9 +75,10 @@ func IsExistingServer() bool {
|
|||
// K3sCmd launches the provided K3s command via exec. Command blocks until finished.
|
||||
// Command output from both Stderr and Stdout is provided via string. Input can
|
||||
// be a single string with space separated args, or multiple string args
|
||||
// cmdEx1, err := K3sCmd("etcd-snapshot", "ls")
|
||||
// cmdEx2, err := K3sCmd("kubectl get pods -A")
|
||||
// cmdEx2, err := K3sCmd("kubectl", "get", "pods", "-A")
|
||||
//
|
||||
// cmdEx1, err := K3sCmd("etcd-snapshot", "ls")
|
||||
// cmdEx2, err := K3sCmd("kubectl get pods -A")
|
||||
// cmdEx2, err := K3sCmd("kubectl", "get", "pods", "-A")
|
||||
func K3sCmd(inputArgs ...string) (string, error) {
|
||||
if !IsRoot() {
|
||||
return "", errors.New("integration tests must be run as sudo/root")
|
||||
|
|
|
@ -111,7 +111,7 @@ func RunCommand(cmd string) (string, error) {
|
|||
return string(out), err
|
||||
}
|
||||
|
||||
//Used to count the pods using prefix passed in the list of pods
|
||||
// Used to count the pods using prefix passed in the list of pods
|
||||
func CountOfStringInSlice(str string, pods []Pod) int {
|
||||
count := 0
|
||||
for _, pod := range pods {
|
||||
|
|
Loading…
Reference in New Issue