Skip to content

Commit 4c24050

Browse files
committed
docs(main): per-line doc comments on completion-related const block
The block-level comment above the const () group only described completionInternal but read as if it documented all three constants. Move to per-line doc comments so each constant carries its own explanation: initSubcommandName (project Chart.yaml creator), completionSubcommand (user-facing shell completion generator), completionInternal (cobra internal Tab autocompletion). Signed-off-by: Aleksei Sviridkin <f@lex.la>
1 parent fa97b28 commit 4c24050

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

main.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ import (
1919
"github.com/spf13/cobra"
2020
)
2121

22-
// completionInternal is cobra's reserved internal subcommand name
23-
// driving Tab-key autocompletion. Constant because it appears both
24-
// in skipConfigCommands and in cobra's exported API.
2522
const (
26-
initSubcommandName = "init"
23+
// initSubcommandName is the cobra subcommand that creates the
24+
// project Chart.yaml and the init-time prefix check in main()
25+
// branches on.
26+
initSubcommandName = "init"
27+
// completionSubcommand is cobra's user-facing shell-completion
28+
// subcommand (talm completion bash | zsh | fish).
2729
completionSubcommand = "completion"
28-
completionInternal = "__complete"
30+
// completionInternal is cobra's reserved internal subcommand
31+
// name driving Tab-key autocompletion. Constant because it
32+
// appears both in skipConfigCommands and in cobra's exported
33+
// API.
34+
completionInternal = "__complete"
2935
)
3036

3137
// cmdNameTalm is the binary name used both as the cobra root

0 commit comments

Comments
 (0)