newFlagSet creates a FlagSet with the common -enterprise flag pre-registered.
(name string)
| 80 | |
| 81 | // newFlagSet creates a FlagSet with the common -enterprise flag pre-registered. |
| 82 | func newFlagSet(name string) (*flag.FlagSet, *string) { |
| 83 | fs := flag.NewFlagSet(name, flag.ExitOnError) |
| 84 | enterprise := fs.String("enterprise", "", "Enterprise slug (required).") |
| 85 | return fs, enterprise |
| 86 | } |
| 87 | |
| 88 | // parseAndInit parses the FlagSet, validates the enterprise flag, reads |
| 89 | // environment variables, and returns a ready-to-use context, client, and |