mirror of https://github.com/databricks/cli.git
Hide commands under preview from help output (#469)
## Changes TSIA Depends on https://github.com/databricks/databricks-sdk-go/pull/497. ## Tests Manually looked at the help output and no longer see the hidden commands.
This commit is contained in:
parent
63437a6a98
commit
96643fd746
|
@ -20,13 +20,18 @@ import (
|
|||
{{define "service"}}
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "{{(.TrimPrefix "account").KebabName}}",
|
||||
{{if .Description -}}
|
||||
{{- if .Description }}
|
||||
Short: `{{.Summary | without "`"}}`,
|
||||
Long: `{{.Comment " " 80 | without "`"}}`,
|
||||
{{- end }}
|
||||
Annotations: map[string]string{
|
||||
"package": "{{ .Package.Name }}",
|
||||
},
|
||||
{{- if .IsPrivatePreview }}
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
{{- $serviceName := .KebabName -}}
|
||||
|
@ -79,10 +84,16 @@ func init() {
|
|||
{{- $hasRequiredArgs := and (not $hasIdPrompt) $hasPosArgs -}}
|
||||
var {{.CamelName}}Cmd = &cobra.Command{
|
||||
Use: "{{.KebabName}}{{if $hasPosArgs}}{{range .Request.RequiredFields}} {{.ConstantName}}{{end}}{{end}}",
|
||||
{{if .Description -}}
|
||||
{{- if .Description }}
|
||||
Short: `{{.Summary | without "`"}}`,
|
||||
Long: `{{.Comment " " 80 | without "`"}}`,
|
||||
{{end}}
|
||||
{{- end }}
|
||||
{{- if .IsPrivatePreview }}
|
||||
|
||||
// This command is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
{{- end }}
|
||||
|
||||
Annotations: map[string]string{},{{if $hasRequiredArgs }}
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs({{len .Request.RequiredFields}})
|
||||
|
|
|
@ -21,6 +21,9 @@ var Cmd = &cobra.Command{
|
|||
Annotations: map[string]string{
|
||||
"package": "iam",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
|
|
@ -20,6 +20,9 @@ var Cmd = &cobra.Command{
|
|||
Annotations: map[string]string{
|
||||
"package": "billing",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
|
|
@ -29,6 +29,9 @@ var Cmd = &cobra.Command{
|
|||
Annotations: map[string]string{
|
||||
"package": "catalog",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
|
|
@ -333,6 +333,9 @@ var maintenanceCmd = &cobra.Command{
|
|||
|
||||
Enables or disables auto maintenance on the metastore.`,
|
||||
|
||||
// This command is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
|
||||
Annotations: map[string]string{},
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(2)
|
||||
|
|
|
@ -19,6 +19,9 @@ var Cmd = &cobra.Command{
|
|||
Annotations: map[string]string{
|
||||
"package": "catalog",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// start disable command
|
||||
|
|
|
@ -26,6 +26,9 @@ var Cmd = &cobra.Command{
|
|||
Annotations: map[string]string{
|
||||
"package": "catalog",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
|
Loading…
Reference in New Issue