Skip to content

Commit aa925d3

Browse files
authored
fix hidden flag property (#893)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed <!-- Describe what has changed in this PR --> Support `hidden: true` flag. It has no effect right now. ## Why? <!-- Tell your future self why have you made these changes --> While there isn't a use case anymore in the CLI, I was told for the Cloud CLI we want to add Temporal-specific flags for test environments that we don't want to expose to the end user in help texts. ## Checklist <!--- add/delete as needed ---> 1. Closes <!-- add issue number here --> 2. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io -->
1 parent 046eaa4 commit aa925d3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

internal/commandsgen/code.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,5 +458,8 @@ func (o *Option) writeFlagBuilding(selfVar, flagVar string, w *codeWriter) error
458458
if o.Deprecated != "" {
459459
w.writeLinef("_ = %v.MarkDeprecated(%q, %q)", flagVar, o.Name, o.Deprecated)
460460
}
461+
if o.Hidden {
462+
w.writeLinef("_ = %v.MarkHidden(%q)", flagVar, o.Name)
463+
}
461464
return nil
462465
}

internal/commandsgen/parse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type (
2727
Aliases []string `yaml:"aliases,omitempty"`
2828
EnumValues []string `yaml:"enum-values,omitempty"`
2929
Experimental bool `yaml:"experimental,omitempty"`
30+
Hidden bool `yaml:"hidden,omitempty"`
3031
HiddenLegacyValues []string `yaml:"hidden-legacy-values,omitempty"`
3132
}
3233

internal/temporalcli/commands.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
# default: The default value. No default means zero value of the type. (string)
109109
# enum-values: A list of possible values for the string-enum type. (string[])
110110
# aliases: A list of aliases for the option. (string[])
111+
# hidden: Hides the option from help output. (bool)
111112
# option-sets: A list of option sets. (string[])
112113

113114
# * name, summary, and descrption are required fields. All other fields are optional.
@@ -3374,7 +3375,6 @@ commands:
33743375
- name: queue-rps-limit-reason
33753376
type: string
33763377
description: Reason for queue rate limit update.
3377-
hidden: true
33783378
- name: fairness-key-rps-limit-default
33793379
type: string
33803380
display-type: float|default
@@ -3384,7 +3384,6 @@ commands:
33843384
- name: fairness-key-rps-limit-reason
33853385
type: string
33863386
description: Reason for fairness key rate limit update.
3387-
hidden: true
33883387

33893388
- name: temporal workflow
33903389
summary: Start, list, and operate on Workflows

0 commit comments

Comments
 (0)