Skip to content

Commit 89886b3

Browse files
committed
Use explicit package name in "docsgen" CLI package import
The template "docsgen" program for generating the website Cobra CLI reference content relies on the project's Cobra CLI package being named `cli`. But this is not guaranteed to be so, and in fact the Cobra documentation uses `cmd` instead. Confusion caused by applying the program to projects that use different package names will be avoided by specifying an explicit package name in the import statement.
1 parent 8024b90 commit 89886b3

File tree

1 file changed

+2
-2
lines changed
  • workflow-templates/assets/cobra/docsgen

1 file changed

+2
-2
lines changed

workflow-templates/assets/cobra/docsgen/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package main
1818
import (
1919
"os"
2020

21-
// TODO: Replace CLI_PACKAGE_NAME with the project's Cobra CLI package name
22-
"CLI_PACKAGE_NAME"
21+
// TODO: Replace CLI_PACKAGE_NAME with the project's Cobra CLI package import path
22+
cli "CLI_PACKAGE_NAME"
2323
"github.com/spf13/cobra/doc"
2424
)
2525

0 commit comments

Comments
 (0)