spf13/cobra-cli

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

cuizhaoyue opened this issue · 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

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