- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: remove org context switcher in the cli#13674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
b4c2853e9b236a2917474268c1879ed53475870033fcf27d38a86eb003d790775950128b7942c3ec606e27979a4ddf2739File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -53,20 +53,19 @@ var ( | ||
| ) | ||
| const ( | ||
| varURL = "url" | ||
| varToken = "token" | ||
| varAgentToken = "agent-token" | ||
| varAgentTokenFile = "agent-token-file" | ||
| varAgentURL = "agent-url" | ||
| varHeader = "header" | ||
| varHeaderCommand = "header-command" | ||
| varNoOpen = "no-open" | ||
| varNoVersionCheck = "no-version-warning" | ||
| varNoFeatureWarning = "no-feature-warning" | ||
| varForceTty = "force-tty" | ||
| varVerbose = "verbose" | ||
| varDisableDirect = "disable-direct-connections" | ||
| notLoggedInMessage = "You are not logged in. Try logging in using 'coder login <url>'." | ||
| @@ -452,15 +451,6 @@ func (r *RootCmd) Command(subcommands []*serpent.Command) (*serpent.Command, err | ||
| Value: serpent.StringOf(&r.globalConfig), | ||
| Group: globalGroup, | ||
| }, | ||
| { | ||
| Flag: "version", | ||
| // This was requested by a customer to assist with their migration. | ||
| @@ -477,21 +467,20 @@ func (r *RootCmd) Command(subcommands []*serpent.Command) (*serpent.Command, err | ||
| // RootCmd contains parameters and helpers useful to all commands. | ||
| type RootCmd struct { | ||
| clientURL *url.URL | ||
| token string | ||
| globalConfig string | ||
| header []string | ||
| headerCommand string | ||
| agentToken string | ||
| agentTokenFile string | ||
| agentURL *url.URL | ||
| forceTTY bool | ||
| noOpen bool | ||
| verbose bool | ||
| versionFlag bool | ||
| disableDirect bool | ||
| debugHTTP bool | ||
| noVersionCheck bool | ||
| noFeatureWarning bool | ||
| @@ -645,13 +634,14 @@ func NewOrganizationContext() *OrganizationContext { | ||
| func (o *OrganizationContext) AttachOptions(cmd *serpent.Command) { | ||
| cmd.Options = append(cmd.Options, serpent.Option{ | ||
| Name: "Organization", | ||
| Description: "Select which organization(uuid or name) to use.", | ||
| // Only required if the user is a part of more than 1 organization. | ||
| // Otherwise, we can assume a default value. | ||
| Required: false, | ||
| Flag: "org", | ||
| FlagShorthand: "z", | ||
| ||
| Env: "CODER_ORGANIZATION", | ||
| Value: serpent.StringOf(&o.FlagSelect), | ||
| }) | ||
| } | ||