Simplified

This commit is contained in:
Aleksandr Kramarenko 2020-03-12 21:20:13 +03:00
parent 32dd20a85b
commit 8f64abd176
3 changed files with 6 additions and 6 deletions

View File

@ -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()
}
}

View File

@ -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()
}
}

View File

@ -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()
}
}