Fix: fix flag conflict

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
This commit is contained in:
barnettZQG
2022-02-09 12:04:07 +08:00
parent f6eea78ec8
commit 440c9947c7
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -9,9 +9,12 @@ include makefiles/e2e.mk
all: build
# Run tests
test: vet lint staticcheck unit-test-core
test: vet lint staticcheck unit-test-core test-cli-gen
@$(OK) unit-tests pass
test-cli-gen:
mkdir -p ./bin/doc
go run ./hack/docgen/gen.go ./bin/doc
unit-test-core:
go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver)
go test $(shell go list ./references/... | grep -v apiserver)
+1 -1
View File
@@ -279,7 +279,7 @@ func NewDefinitionInitCommand(c common.Args) *cobra.Command {
}
cmd.Flags().StringP(FlagType, "t", "", "Specify the type of the new definition. Valid types: "+strings.Join(pkgdef.ValidDefinitionTypes(), ", "))
cmd.Flags().StringP(FlagDescription, "d", "", "Specify the description of the new definition.")
cmd.Flags().StringP(FlagTemplateYAML, "y", "", "Specify the template yaml file that definition will use to build the schema. If empty, a default template for the given definition type will be used.")
cmd.Flags().StringP(FlagTemplateYAML, "f", "", "Specify the template yaml file that definition will use to build the schema. If empty, a default template for the given definition type will be used.")
cmd.Flags().StringP(FlagOutput, "o", "", "Specify the output path of the generated definition. If empty, the definition will be printed in the console.")
cmd.Flags().BoolP(FlagInteractive, "i", false, "Specify whether use interactive process to help generate definitions.")
cmd.Flags().StringP(FlagProvider, "p", "", "Specify which provider the cloud resource definition belongs to. Only `alibaba`, `aws`, `azure` are supported.")