Skip to content

Commit 5126718

Browse files
committed
fix error message for creating examples
1 parent 999ae5a commit 5126718

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/kubebuilder/create/example/example.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import (
2222
"os"
2323
"path/filepath"
2424

25+
"strings"
26+
2527
"github.com/kubernetes-sigs/kubebuilder/cmd/kubebuilder/util"
2628
"github.com/spf13/cobra"
27-
"strings"
2829
)
2930

3031
// configCmd represents the config command
@@ -34,14 +35,17 @@ var configCmd = &cobra.Command{
3435
Long: `Create the docs example scaffoling for an API.
3536
3637
Example is written to docs/reference/examples/<lower kind>/<lower kind>.yaml
38+
`,
39+
Example: `# Create a new documentation example under docs/reference/examples/mykind/mykind.yaml
40+
kubebuilder create example --kind MyKind --version v1beta1 --group mygroup.my.domain
3741
`,
3842
Run: func(cmd *cobra.Command, args []string) {
3943
if kind == "" {
4044
fmt.Printf("Must specify --kind\n")
4145
return
4246
}
4347
if version == "" {
44-
fmt.Printf("Must specify --name\n")
48+
fmt.Printf("Must specify --version\n")
4549
return
4650
}
4751
if group == "" {

0 commit comments

Comments
 (0)