This repository was archived by the owner on Sep 28, 2021. It is now read-only.
Repository navigation
Add alternate states - #394
Merged
Merged
Conversation
wennmo
reviewed
Sep 2, 2019
wennmo
left a comment
Member
There was a problem hiding this comment.
Looks nice, some minor comments!
| "github.com/spf13/viper" | ||
| ) | ||
|
|
||
| var listAlternateStateCmd = &cobra.Command{ |
Member
There was a problem hiding this comment.
Since this returns a list of all alternate state it should probably be named listAlternateStatesCmd
| var removeAlternateStateCmd = &cobra.Command{ | ||
| Use: "rm <alternate-state-name>", | ||
| Args: cobra.ExactArgs(1), | ||
| Short: "Removes an alternate states in the current app", |
Member
There was a problem hiding this comment.
Since you can only remove one state this should be singular
| stateNameExists := Contains(states, alternateStateName) | ||
|
|
||
| if !stateNameExists { | ||
| FatalErrorf("no state with the name '%s' found in the app", alternateStateName) |
Member
There was a problem hiding this comment.
Maybe add alternate to this error message to make it clearer.
glooms
reviewed
Sep 2, 2019
| Short: "Explore and manage alternate states", | ||
| Long: "Explore and manage alternate states", | ||
| Aliases: []string{"alternatestate"}, | ||
| Annotations: map[string]string{ |
Contributor
There was a problem hiding this comment.
Maybe annotate with experimental?
Contributor
|
Ironic typo there 🙈 |
wennmo
approved these changes
Sep 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.