go-organization/simple-structure/module-str/mymodule/main.go

26 lines
556 B
Go
Raw Permalink Normal View History

2023-07-24 11:49:52 +03:00
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")
2023-07-24 13:52:19 +03:00
fmt.Println("just use `go get github.com/user/project@branch-name` for branches.")
fmt.Println("`././...@hash` for commits. `././...@vX.X.X` fro versions")
2023-07-24 11:49:52 +03:00
}