Skip to content

Commit

Permalink
fix error message for creating examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittrock committed Apr 2, 2018
1 parent 999ae5a commit 5126718
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/kubebuilder/create/example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import (
"os"
"path/filepath"

"strings"

"github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/util"
"github.com/spf13/cobra"
"strings"
)

// configCmd represents the config command
Expand All @@ -34,14 +35,17 @@ var configCmd = &cobra.Command{
Long: `Create the docs example scaffoling for an API.
Example is written to docs/reference/examples/<lower kind>/<lower kind>.yaml
`,
Example: `# Create a new documentation example under docs/reference/examples/mykind/mykind.yaml
kubebuilder create example --kind MyKind --version v1beta1 --group mygroup.my.domain
`,
Run: func(cmd *cobra.Command, args []string) {
if kind == "" {
fmt.Printf("Must specify --kind\n")
return
}
if version == "" {
fmt.Printf("Must specify --name\n")
fmt.Printf("Must specify --version\n")
return
}
if group == "" {
Expand Down

0 comments on commit 5126718

Please sign in to comment.