feat: add groups support to the CLI (#4755)

This commit is contained in:
Jon Ayers
2022-10-27 16:49:35 -05:00
committed by GitHub
parent ce2a7d49b1
commit 90f77a3415
28 changed files with 766 additions and 18 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ import (
)
var (
caret = cliui.Styles.Prompt.String()
Caret = cliui.Styles.Prompt.String()
// Applied as annotations to workspace commands
// so they display in a separated "help" section.
@@ -352,8 +352,8 @@ func createAgentClient(cmd *cobra.Command) (*codersdk.Client, error) {
return client, nil
}
// currentOrganization returns the currently active organization for the authenticated user.
func currentOrganization(cmd *cobra.Command, client *codersdk.Client) (codersdk.Organization, error) {
// CurrentOrganization returns the currently active organization for the authenticated user.
func CurrentOrganization(cmd *cobra.Command, client *codersdk.Client) (codersdk.Organization, error) {
orgs, err := client.OrganizationsByUser(cmd.Context(), codersdk.Me)
if err != nil {
return codersdk.Organization{}, nil