mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
Add make lint and run it on CI
This commit is contained in:
parent
6feedaf939
commit
4e9a4185af
13 changed files with 58 additions and 101 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue