Fix gofmt warnings

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/6150/head
Brad Davidson 2022-09-09 20:55:27 +00:00 committed by Brad Davidson
parent 1b806f5fee
commit ae7d6285b6
4 changed files with 7 additions and 5 deletions

View File

@ -11,6 +11,7 @@
},
"run": {
"skip-dirs": [
"pkg/generated",
"build",
"contrib",
"manifests",

View File

@ -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)

View File

@ -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")

View File

@ -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 {