25 lines
556 B
Go
25 lines
556 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"mymodule/mypackage"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func main() {
|
|
cmd := &cobra.Command{
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println("Hello, Modules!")
|
|
mypackage.PrintHello()
|
|
},
|
|
}
|
|
fmt.Println("Calling cmd.Execute()!")
|
|
cmd.Execute()
|
|
|
|
fmt.Printf("\n\n")
|
|
fmt.Println("You can also add specific versions or branches as required package")
|
|
fmt.Println("just use `go get github.com/user/project@branch-name` for branches.")
|
|
fmt.Println("`././...@hash` for commits. `././...@vX.X.X` fro versions")
|
|
|
|
}
|