Skip to content

Commit

Permalink
fix(typo): fix message typo
Browse files Browse the repository at this point in the history
fix message typo

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Jul 8, 2022
1 parent b9b1a8f commit 6bc73c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ linters:
- ineffassign
- misspell
- revive
# - staticcheck
- staticcheck
- structcheck
# - typecheck
- unused
Expand Down
25 changes: 12 additions & 13 deletions internal/pkg/cli/kubectl/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ package kubectl

import (
"math/rand"
"os"
"strings"
"time"

"github.com/spf13/cobra"
Expand All @@ -19,17 +17,18 @@ import (
)

func Main() {
kubenv := os.Getenv("KUBECONFIG")
for i, arg := range os.Args {
if strings.HasPrefix(arg, "--kubeconfig=") {
kubenv = strings.Split(arg, "=")[1]
} else if strings.HasPrefix(arg, "--kubeconfig") && i+1 < len(os.Args) {
kubenv = os.Args[i+1]
}
}
if kubenv == "" {
// TODO: use default kubeconfig
}
// kubenv := os.Getenv("KUBECONFIG")
// for i, arg := range os.Args {
// if strings.HasPrefix(arg, "--kubeconfig=") {
// kubenv = strings.Split(arg, "=")[1]
// } else if strings.HasPrefix(arg, "--kubeconfig") && i+1 < len(os.Args) {
// kubenv = os.Args[i+1]
// }
// }
// if kubenv == "" {
// // TODO: use default kubeconfig
// kubenv = filepath.Join(homedir.HomeDir(), ".kube", "config")
// }

main()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/selfupdate/selfupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func uncompressAndUpdate(log log.Logger, src io.Reader, assetURL, cmdPath string
return err
}

log.Debugf("will upgrade %s to the latest downloaded from", cmdPath, assetURL)
log.Debugf("will upgrade %s to the latest downloaded from %s", cmdPath, assetURL)
return update.Apply(asset, update.Options{
TargetPath: cmdPath,
})
Expand Down

0 comments on commit 6bc73c2

Please sign in to comment.