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

Commit50cdb32

Browse files
committed
Lint
1 parenta2f68ea commit50cdb32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎cli/organization.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ func (r *RootCmd) currentOrganization() *clibase.Cmd {
3232
client=new(codersdk.Client)
3333
formatter=cliui.NewOutputFormatter(
3434
cliui.ChangeFormatterData(cliui.TextFormat(),func(dataany) (any,error) {
35-
typed:=data.([]codersdk.Organization)
35+
typed,ok:=data.([]codersdk.Organization)
36+
if!ok {
37+
// This should never happen
38+
return"",fmt.Errorf("expected []Organization, got %T",data)
39+
}
3640
iflen(typed)!=1 {
3741
return"",fmt.Errorf("expected 1 organization, got %d",len(typed))
3842
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp