Remove unncessary printf usage
This commit is contained in:
parent
0ead3398a7
commit
0a3706a404
3 changed files with 6 additions and 5 deletions
|
|
@ -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 != "" {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue