help

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replace

func Replace(cmd *cobra.Command, replacers []Replacer)

Replace はコマンドのヘルプメッセージ中のプレースホルダをコマンドパスで置換する。 この処理は cmd 配下の init() で呼び出されるが、その時点では各コマンドの CommandPath() は初期化されていない。 そのためヘルプを呼び出すタイミングで初期化させるために、SetHelpFunc() を使っている。

Types

type Replacer

type Replacer struct {
	Key     string
	Command *cobra.Command
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL