diff --git a/cmd/root.go b/cmd/root.go index 4281907..d2a10c8 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -43,6 +43,7 @@ func init() { RootCmd.PersistentFlags().StringVar(&util.WorkflowName, "workflow", "", "Workflow name") RootCmd.PersistentFlags().StringVar(&util.URL, "url", "", "URL for referencing a workflow, project, or space") RootCmd.PersistentFlags().StringVar(&util.Cfg.Dependency, "node-dependency", "", "This flag doesn't affect the execution logic of the CLI in any way and is intended for controlling node execution order on the Trickest platform only.") + RootCmd.PersistentFlags().StringVar(&util.Cfg.BaseUrl, "api-endpoint", "https://api.trickest.io/hive/", "The base Trickest platform API endpoint.") cobra.OnInitialize(util.CreateRequest, initVaultID) diff --git a/util/util.go b/util/util.go index bac1579..e64bf07 100644 --- a/util/util.go +++ b/util/util.go @@ -25,12 +25,9 @@ import ( type UnexpectedResponse map[string]interface{} -const ( - BaseURL = "https://api.trickest.io/hive/" -) - var ( - Cfg = types.Config{ + BaseURL = "https://api.trickest.io/hive/" + Cfg = types.Config{ BaseUrl: BaseURL, } SpaceName string