Add make lint and run it on CI

This commit is contained in:
Djordje Lukic 2020-05-04 23:50:00 +02:00 committed by Djordje Lukic
parent 6feedaf939
commit 4e9a4185af
13 changed files with 58 additions and 101 deletions

View file

@ -46,7 +46,7 @@ func LoadConfigFile(configDir string, configFileName string) (*ConfigFile, error
if err != nil {
return nil, fmt.Errorf("can't read %s: %w", filename, err)
}
// nolint
// nolint errcheck
defer file.Close()
err = json.NewDecoder(file).Decode(&configFile)
if err != nil {

View file

@ -47,7 +47,7 @@ type Flags struct {
Context string
}
// AddFlags adds persistent (globa) flags
// AddFlags adds persistent (global) flags
func (c *Flags) AddFlags(flags *pflag.FlagSet) {
flags.StringVar(&c.Config, "config", filepath.Join(home(), configFileDir), "Location of the client config files `DIRECTORY`")
flags.StringVarP(&c.Context, "context", "c", os.Getenv("DOCKER_CONTEXT"), "context")