Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Conversation

riyazdf
Copy link
Contributor

@riyazdf riyazdf commented Sep 22, 2016

Add messages for successful CLI operations, such as publish (and -p), delete, and key rotate

Closes #973

Signed-off-by: Riyaz Faizullabhoy [email protected]

Copy link
Contributor

@endophage endophage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@cyli cyli left a 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"
Copy link
Contributor

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!

err = cl.Remove(t.deleteIdx)
}
return cl.Remove(t.deleteIdx)
if err != nil {
Copy link
Contributor

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.

// 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
Copy link
Contributor

@HuKeping HuKeping Sep 23, 2016

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.

Copy link
Contributor Author

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 👍

@riyazdf riyazdf merged commit 0618825 into hotfix/0.4.1 Sep 23, 2016
@riyazdf riyazdf deleted the success-msg-cli branch September 23, 2016 17:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants