Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3439d77

Browse files
mafredrikylecarbs
authored andcommitted
fix: Use the cobra CommandPath for usage to avoid duplication (#1617)
1 parent4276fc5 commit3439d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎cli/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,6 @@ func versionTemplate() string {
264264

265265
// FormatCobraError colorizes and adds "--help" docs to cobra commands.
266266
funcFormatCobraError(errerror,cmd*cobra.Command)string {
267-
helpErrMsg:=fmt.Sprintf("Run '%s%s--help' for usage.",cmd.Root().Name(),cmd.Name())
267+
helpErrMsg:=fmt.Sprintf("Run '%s --help' for usage.",cmd.CommandPath())
268268
returncliui.Styles.Error.Render(err.Error()+"\n"+helpErrMsg)
269269
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp