Skip to content

Commit

Permalink
fix: Lint failures
Browse files Browse the repository at this point in the history
Signed-off-by: Nithish <nithishkarthik01@gmail.com>
  • Loading branch information
humblenginr committed Oct 23, 2022
1 parent ab2996f commit a1ad195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/syncmodutil/internal/modsync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ type GoMod struct {
RequiredVersions []Package
}

//For debugging
// For debugging
func (g *GoMod) PrintRequiredVersions() {
for _, v := range g.RequiredVersions {
fmt.Printf("package=%s ;version=%s\n", v.Name, v.Version)
}
}

//For debugging
// For debugging
func (g *GoMod) PrintReplacedVersions() {
for _, v := range g.ReplacedVersions {
fmt.Printf("%s replaced by %s\n", v[0].Name+v[0].Version, v[1].Name+v[1].Version)
Expand Down Expand Up @@ -96,7 +96,7 @@ func (g *GoMod) SyncRequire(f io.Reader) (gomod string, err error) {
return
}

//NewGoMod takes an io.Reader to a go.mod and returns GoMod struct
// NewGoMod takes an io.Reader to a go.mod and returns GoMod struct
func New(f io.Reader) (*GoMod, error) {
var b = make([]byte, 1000)
b, err := io.ReadAll(f)
Expand Down
2 changes: 0 additions & 2 deletions utils/kubernetes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ func DetectKubeConfig(configfile []byte) (config *rest.Config, err error) {
kubeconfig := os.Getenv("KUBECONFIG")
if kubeconfig != "" {
if config, err = clientcmd.BuildConfigFromFlags("", kubeconfig); err == nil {

return config, err
}
}

// Look for kubeconfig at the default path
path := filepath.Join(utils.GetHome(), ".kube", "config")
if config, err = clientcmd.BuildConfigFromFlags("", path); err == nil {

return config, err
}

Expand Down

0 comments on commit a1ad195

Please sign in to comment.