maint: clean up some errors
This commit is contained in:
parent
de4e37ed75
commit
2f19fa792f
4 changed files with 5 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package delete
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ func deleteRun(opts *DeleteOptions) error {
|
|||
}
|
||||
|
||||
if username != gist.Owner.Login {
|
||||
return fmt.Errorf("You do not own this gist.")
|
||||
return errors.New("you do not own this gist")
|
||||
}
|
||||
|
||||
err = deleteGist(apiClient, host, gistID)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ func Test_deleteRun(t *testing.T) {
|
|||
Owner: &shared.GistOwner{Login: "octocat2"},
|
||||
},
|
||||
wantErr: true,
|
||||
wantStderr: "You do not own this gist.",
|
||||
wantStderr: "you do not own this gist",
|
||||
}, {
|
||||
name: "successfully delete",
|
||||
gist: &shared.Gist{
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ func editRun(opts *EditOptions) error {
|
|||
}
|
||||
|
||||
if username != gist.Owner.Login {
|
||||
return fmt.Errorf("You do not own this gist.")
|
||||
return errors.New("you do not own this gist")
|
||||
}
|
||||
|
||||
shouldUpdate := false
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ func Test_editRun(t *testing.T) {
|
|||
},
|
||||
Owner: &shared.GistOwner{Login: "octocat2"},
|
||||
},
|
||||
wantErr: "You do not own this gist.",
|
||||
wantErr: "you do not own this gist",
|
||||
},
|
||||
{
|
||||
name: "add file to existing gist",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue