Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hide commands of services that are already hidden #1438

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .codegen/service.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (

{{define "service"}}
{{- $excludeMethods := list "put-secret" -}}
{{- $hideService := .IsPrivatePreview }}

// Slice with functions to override default command behavior.
// Functions can be added from the `init()` function in manually curated files in this directory.
Expand All @@ -57,7 +58,7 @@ func New() *cobra.Command {
"package": "{{ .Package.Name }}",
},
{{- end }}
{{- if .IsPrivatePreview }}
{{- if $hideService }}

// This service is being previewed; hide from help output.
Hidden: true,
Expand Down Expand Up @@ -190,7 +191,8 @@ func new{{.PascalName}}() *cobra.Command {
{{- end -}}
`
{{- end }}
{{- if .IsPrivatePreview }}
{{/* Don't hide commands if the service itself is already hidden. */}}
{{- if and (not $hideService) .IsPrivatePreview }}

// This command is being previewed; hide from help output.
cmd.Hidden = true
Expand Down
30 changes: 0 additions & 30 deletions cmd/workspace/apps/apps.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions cmd/workspace/consumer-installations/consumer-installations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions cmd/workspace/consumer-listings/consumer-listings.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions cmd/workspace/consumer-providers/consumer-providers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading