Skip to content

Tutorial my-cli documentation incorrect #2340

@platform-skyfed

Description

@platform-skyfed

ref: https://cobra.dev/docs/tutorials/getting-started/

Between step 2 and step 3 the cobra-cli command does not create a go.mod file in the generated folder automatically. I needed to run go mod init, go mod tidy, and update the import line in the main.go file to contain the newmodulename/cmd and everything then complied/ran correctly.

I don't mind making a PR and updating the docs if it's a documentation issue but this seems more like a potential bug in the cobra-cli command itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions