Skip to content

Commit

Permalink
adds posix style flags for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jarededwards committed Nov 14, 2024
1 parent ce762e6 commit adcc481
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ func getInitCommand() *cobra.Command {
},
}

cmd.Flags().StringVar(&apiKey, "apiKey", "", "api key for interacting with colony cloud")
cmd.Flags().StringVar(&apiURL, "apiURL", "https://colony-api-virtual.konstruct.io", "api url for interacting with colony cloud")
cmd.Flags().StringVar(&loadBalancerInterface, "loadBalancerInterface", "eth0", "the local network interface for colony to use")
cmd.Flags().StringVar(&loadBalancerIP, "loadBalancerIP", "192.168.0.192", "the local network interface for colony to use")

cmd.MarkFlagRequired("apiKey")
cmd.MarkFlagRequired("apiURL")
cmd.MarkFlagRequired("loadBalancerInterface")
cmd.MarkFlagRequired("loadBalancerIP")
cmd.Flags().StringVar(&apiKey, "api-key", "", "api key for interacting with colony cloud")
cmd.Flags().StringVar(&apiURL, "api-url", "https://colony-api-virtual.konstruct.io", "api url for interacting with colony cloud")
cmd.Flags().StringVar(&loadBalancerInterface, "load-balancer-interface", "eth0", "the local network interface for colony to use")
cmd.Flags().StringVar(&loadBalancerIP, "load-balancer-ip", "192.168.0.192", "the local network interface for colony to use")

cmd.MarkFlagRequired("api-key")
cmd.MarkFlagRequired("api-url")
cmd.MarkFlagRequired("load-balancer-interface")
cmd.MarkFlagRequired("load-balancer-ip")
return cmd
}

0 comments on commit adcc481

Please sign in to comment.