add ability to enable verbose logging
This commit is contained in:
@@ -9,19 +9,18 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func parseArgs() (string, string, string) {
|
||||
func main() {
|
||||
var password, configPath, workDir string
|
||||
var verbose bool
|
||||
|
||||
flag.StringVar(&password, "p", "", "Password to access hosts")
|
||||
flag.StringVar(&configPath, "c", "/etc/kube-forge/config.yaml", "Path to config file")
|
||||
flag.StringVar(&workDir, "d", "/var/lib/kube-forge", "Path to kube-forge work dir")
|
||||
flag.BoolVar(&verbose, "v", false, "Enable verbose logging")
|
||||
fmt.Println(verbose)
|
||||
flag.Parse()
|
||||
return password, configPath, workDir
|
||||
}
|
||||
|
||||
func main() {
|
||||
password, configPath, workDir := parseArgs()
|
||||
config := config.CreateConfig(configPath, workDir, password)
|
||||
|
||||
config.Verbose = verbose
|
||||
repositories, releases := templates.GetHelmAppsConfigData()
|
||||
config.Repositories = repositories
|
||||
config.Releases = releases
|
||||
|
||||
Reference in New Issue
Block a user