Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc145f11

Browse files
authored
chore: remove db import from cli package (#14709)
1 parent5be02a2 commitc145f11

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎cli/root.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"golang.org/x/mod/semver"
3030
"golang.org/x/xerrors"
3131

32-
"github.com/coder/coder/v2/coderd/database/db2sdk"
3332
"github.com/coder/pretty"
3433

3534
"github.com/coder/coder/v2/buildinfo"
@@ -658,9 +657,11 @@ func (o *OrganizationContext) Selected(inv *serpent.Invocation, client *codersdk
658657
}
659658

660659
// No org selected, and we are more than 1? Return an error.
661-
validOrgs:=db2sdk.List(orgs,func(org codersdk.Organization)string {
662-
returnfmt.Sprintf("%q",org.Name)
663-
})
660+
validOrgs:=make([]string,0,len(orgs))
661+
for_,org:=rangeorgs {
662+
validOrgs=append(validOrgs,org.Name)
663+
}
664+
664665
return codersdk.Organization{},xerrors.Errorf("Must select an organization with --org=<org_name>. Choose from: %s",strings.Join(validOrgs,", "))
665666
}
666667

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp