-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI prints for successful operations #974
Conversation
3ed2aee
to
277e67a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for fixing this so quickly!
if t.deleteRemote { | ||
rt, err = getTransport(config, gun, admin) | ||
if err != nil { | ||
return err | ||
} | ||
remoteDeleteInfo = " and remote" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Awesome letting them know they got the remote too!
} | ||
return cl.Remove(t.deleteIdx) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally non-blocking stylistic nitpick: you could also do:
if err == nil {
cmd.Printf("...")
}
return err
Which saves one return, and may make it clearer we are doing this because we want to log a success message.
277e67a
to
36f3c94
Compare
// If it was a success, print to terminal and return nil | ||
if err == nil { | ||
cmd.Printf("Successfully reset specified changes for repository %s\n", gun) | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this line could be removed? If so the comment at line 632 should be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely could, it's surprising that govet
/ineffassign
don't seem to care about this. I do like how it's explicit but I'll remove this line 👍
Signed-off-by: Riyaz Faizullabhoy <[email protected]>
36f3c94
to
28195ff
Compare
Add messages for successful CLI operations, such as
publish
(and-p
),delete
, andkey rotate
Closes #973
Signed-off-by: Riyaz Faizullabhoy [email protected]