cmd: add generate and refactor structure#56
Merged
hongchaodeng merged 1 commit intooperator-framework:masterfrom Feb 24, 2018
hongchaodeng:generate
Merged
cmd: add generate and refactor structure#56hongchaodeng merged 1 commit intooperator-framework:masterfrom hongchaodeng:generate
hongchaodeng merged 1 commit intooperator-framework:masterfrom
hongchaodeng:generate
Conversation
fanminshi
reviewed
Feb 23, 2018
| var buildCmd = &cobra.Command{ | ||
| Use: "build <image>", | ||
| Short: "Compiles code and builds artifacts", | ||
| Short: "Compile code and build artifacts", |
Contributor
There was a problem hiding this comment.
I think the original "Compiles code and builds artifacts" is fine.
for example:
Command's short description from etcdctl:
Short: "Puts the given key into the store",
Short: "Watches events stream on keys or prefixes",
I think the key here is to keep language usage and style consistent.
| var newCmd = &cobra.Command{ | ||
| Use: "new <project-name> [required-flags]", | ||
| Short: "Creates a new operator application", | ||
| Short: "Create a new operator application", |
| --api-version and --kind are required flags to generate the new operator application. | ||
|
|
||
| For example, | ||
| For example, |
Contributor
There was a problem hiding this comment.
For example, -> For example:
| "github.com/spf13/cobra" | ||
| ) | ||
|
|
||
| func NewGenerateCmd() *cobra.Command { |
Contributor
There was a problem hiding this comment.
It is better to keep the code consistent.
just use:
var generateCmd = &cobra.Command{..}
| func NewGenerateK8SCmd() *cobra.Command { | ||
| return &cobra.Command{ | ||
| Use: "k8s", | ||
| Short: "Generate Kubernetes code for custom resource", |
Contributor
|
lgtm |
Contributor
Author
|
tested: |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.