style: rename functions in root.go (#623)

* replace isFlagSet with Changed

* style: rename mustGetStringViperFlag and getStringViperFlag, use getParamB to read noauth

* style

* style: move

* fix build error

* rename getServerWithViper to getRunParams
This commit is contained in:
1138-4EB
2019-01-08 21:10:27 +01:00
committed by GitHub
parent e0a3ce95f2
commit 2c526077c0
3 changed files with 54 additions and 68 deletions

View File

@@ -66,7 +66,7 @@ func python(fn pythonFunc, cfg pythonConfig) cobraFunc {
return func(cmd *cobra.Command, args []string) {
data := pythonData{hadDB: true}
path := mustGetStringViperFlag(cmd.Flags(), "database")
path := getParam(cmd.Flags(), "database")
_, err := os.Stat(path)
if os.IsNotExist(err) {