refactor: consolidate app name verification into golang binary

This change ensures we only have to change this logic once in order to get them to apply to both languages in the codebase.
This commit is contained in:
Jose Diaz-Gonzalez
2022-05-29 11:28:34 -04:00
parent cc9d76aa11
commit db4d8dba88
3 changed files with 18 additions and 34 deletions

View File

@@ -38,11 +38,14 @@ func main() {
appName = "--global"
}
fmt.Print(common.GetAppScheduler(appName))
case "verify-app-name":
appName := flag.Arg(1)
err = common.VerifyAppName(appName)
default:
err = fmt.Errorf("Invalid common command call: %v", cmd)
}
if err != nil {
common.LogFailQuiet(err.Error())
common.LogFailWithErrorQuiet(err)
}
}