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

Commitabc0ff9

Browse files
authored
chore: remove database import from cli (#13756)
Cli was using a utility function from a database package.
1 parentb1ec463 commitabc0ff9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎cli/root.go

Lines changed: 4 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"
@@ -659,9 +658,10 @@ func (o *OrganizationContext) Selected(inv *serpent.Invocation, client *codersdk
659658
})
660659

661660
ifindex<0 {
662-
names:=db2sdk.List(orgs,func(f codersdk.Organization)string {
663-
returnf.Name
664-
})
661+
varnames []string
662+
for_,org:=rangeorgs {
663+
names=append(names,org.Name)
664+
}
665665
return codersdk.Organization{},xerrors.Errorf("organization %q not found, are you sure you are a member of this organization? "+
666666
"Valid options for '--org=' are [%s].",o.FlagSelect,strings.Join(names,", "))
667667
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp