-
Notifications
You must be signed in to change notification settings - Fork 518
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 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!
cmd/notary/tuf.go
Outdated
err = cl.Remove(t.deleteIdx) | ||
} | ||
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
cmd/notary/tuf.go
Outdated
// 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]