embeded templates
This commit is contained in:
parent
bf78461bbb
commit
9e4d1a6a28
18 changed files with 63 additions and 58 deletions
15
embed/templates/cmd/version.go.tmpl
Normal file
15
embed/templates/cmd/version.go.tmpl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of {{.PackageName}}",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("{{.PackageName}} ~ {{.ProgramVersion}}")
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue