Skip to content

Commit

Permalink
Simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
akramarenkov committed Mar 12, 2020
1 parent 32dd20a commit 8f64abd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions altsrc/json_source_context.go
Expand Up @@ -19,9 +19,9 @@ func NewJSONSourceFromFlagFunc(flag string) func(c *cli.Context) (InputSourceCon
return func(context *cli.Context) (InputSourceContext, error) {
if context.IsSet(flag) {
return NewJSONSourceFromFile(context.String(flag))
} else {
return defaultInputSource()
}

return defaultInputSource()
}
}

Expand Down
4 changes: 2 additions & 2 deletions altsrc/toml_file_loader.go
Expand Up @@ -90,9 +90,9 @@ func NewTomlSourceFromFlagFunc(flagFileName string) func(context *cli.Context) (
if context.IsSet(flagFileName) {
filePath := context.String(flagFileName)
return NewTomlSourceFromFile(filePath)
} else {
return defaultInputSource()
}

return defaultInputSource()
}
}

Expand Down
4 changes: 2 additions & 2 deletions altsrc/yaml_file_loader.go
Expand Up @@ -36,9 +36,9 @@ func NewYamlSourceFromFlagFunc(flagFileName string) func(context *cli.Context) (
if context.IsSet(flagFileName) {
filePath := context.String(flagFileName)
return NewYamlSourceFromFile(filePath)
} else {
return defaultInputSource()
}

return defaultInputSource()
}
}

Expand Down

0 comments on commit 8f64abd

Please sign in to comment.