diff --git a/pkg/cmd/auth/token/token.go b/pkg/cmd/auth/token/token.go index 7ac65d37e..d9faac7d8 100644 --- a/pkg/cmd/auth/token/token.go +++ b/pkg/cmd/auth/token/token.go @@ -1,6 +1,7 @@ package token import ( + "errors" "fmt" "github.com/MakeNowJust/heredoc" @@ -88,7 +89,7 @@ func tokenRun(opts *TokenOptions) error { if opts.Username != "" { errMsg += fmt.Sprintf(" account %s", opts.Username) } - return fmt.Errorf("%s", errMsg) + return errors.New(errMsg) } if val != "" { diff --git a/pkg/cmd/codespace/create_test.go b/pkg/cmd/codespace/create_test.go index 85d311a47..c5f11bd2f 100644 --- a/pkg/cmd/codespace/create_test.go +++ b/pkg/cmd/codespace/create_test.go @@ -648,14 +648,14 @@ Alternatively, you can run "create" with the "--default-permissions" option to c assert.EqualError(t, err, tt.wantErr.Error()) } if err != nil && tt.wantErr == nil { - t.Logf("%s", err.Error()) + t.Log(err.Error()) } if got := stdout.String(); got != tt.wantStdout { - t.Logf("%s", t.Name()) + t.Log(t.Name()) t.Errorf(" stdout = %v, want %v", got, tt.wantStdout) } if got := stderr.String(); got != tt.wantStderr { - t.Logf("%s", t.Name()) + t.Log(t.Name()) t.Errorf(" stderr = %v, want %v", got, tt.wantStderr) } diff --git a/pkg/cmd/repo/view/view.go b/pkg/cmd/repo/view/view.go index f8cbcb18e..06f85d048 100644 --- a/pkg/cmd/repo/view/view.go +++ b/pkg/cmd/repo/view/view.go @@ -156,7 +156,7 @@ func viewRun(opts *ViewOptions) error { fmt.Fprintf(stdout, "description:\t%s\n", repo.Description) if readme != nil { fmt.Fprintln(stdout, "--") - fmt.Fprintf(stdout, "%s", readme.Content) + fmt.Fprint(stdout, readme.Content) fmt.Fprintln(stdout) }