Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Add alternate states - #394

Merged
axelssonHakan merged 14 commits into
masterfrom
addAlternateStates
Sep 3, 2019
Merged

axelssonHakan merged 14 commits into
masterfrom
addAlternateStates

Conversation

@axelssonHakan

Copy link
Copy Markdown
Member

No description provided.

@wennmo wennmo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks nice, some minor comments!

Comment thread cmd/alternate_state.go Outdated
"github.com/spf13/viper"
)

var listAlternateStateCmd = &cobra.Command{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this returns a list of all alternate state it should probably be named listAlternateStatesCmd

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

Comment thread cmd/alternate_state.go Outdated
var removeAlternateStateCmd = &cobra.Command{
Use: "rm <alternate-state-name>",
Args: cobra.ExactArgs(1),
Short: "Removes an alternate states in the current app",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since you can only remove one state this should be singular

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

Comment thread internal/alternate_state.go Outdated
stateNameExists := Contains(states, alternateStateName)

if !stateNameExists {
FatalErrorf("no state with the name '%s' found in the app", alternateStateName)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe add alternate to this error message to make it clearer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

Comment thread cmd/alternate_state.go
Short: "Explore and manage alternate states",
Long: "Explore and manage alternate states",
Aliases: []string{"alternatestate"},
Annotations: map[string]string{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe annotate with experimental?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed

@wennmo wennmo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@glooms

glooms commented Sep 2, 2019

Copy link
Copy Markdown
Contributor

Ironic typo there 🙈

@axelssonHakan
axelssonHakan merged commit 420e67b into master Sep 3, 2019
@axelssonHakan
axelssonHakan deleted the addAlternateStates branch September 3, 2019 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址