The execute path of import is wrong after generated by cobra-cli command
cuizhaoyue opened this issue · 1 comments
cuizhaoyue commented
- Create a demo
mkdir -p cobra
cd cobra
cobra-cli init --viper demo
- Check the generated main.go file
$ cat demo/main.go
/*
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
*/
package main
import "github.con/cuizhaoyue/go-demo/cobra/cmd"
func main() {
cmd.Execute()
}
- the import in main.go is wrong
The correct path should be
github.con/cuizhaoyue/go-demo/cobra/demo/cmd
rather than
github.con/cuizhaoyue/go-demo/cobra/cmd
- version info
Thecobra-cli
version is the latest version as of 2023-03-04
github-actions commented
This issue is being marked as stale due to a long period of inactivity