go-organization/simple-structure/module-str/mymodule/main.go
2023-07-24 13:52:19 +03:00

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")
}