GetPackageName returns the package name from flag, env, or config
()
| 39 | |
| 40 | // GetPackageName returns the package name from flag, env, or config |
| 41 | func GetPackageName() string { |
| 42 | if packageName != "" { |
| 43 | return packageName |
| 44 | } |
| 45 | if pkg := viper.GetString("package"); pkg != "" { |
| 46 | return pkg |
| 47 | } |
| 48 | if profile := config.GetProfile(); profile != nil { |
| 49 | return profile.DefaultPackage |
| 50 | } |
| 51 | return "" |
| 52 | } |
| 53 | |
| 54 | // GetProfile returns the profile name from flag, env, or config |
| 55 | func GetProfile() string { |