cobra-cli icon indicating copy to clipboard operation
cobra-cli copied to clipboard

The execute path of import is wrong after generated by cobra-cli command

Open cuizhaoyue opened this issue 1 year ago • 1 comments

  1. Create a demo
mkdir -p cobra
cd cobra
cobra-cli init --viper demo
  1. 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()
}
  1. 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
  1. version info The cobra-cli version is the latest version as of 2023-03-04

cuizhaoyue avatar Mar 04 '23 10:03 cuizhaoyue

This issue is being marked as stale due to a long period of inactivity

github-actions[bot] avatar May 04 '23 00:05 github-actions[bot]