2019-06-21 05:27:41 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"example.com/hello/version"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
showVersion := flag.Bool("version", false, "Print version and exit")
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
if *showVersion {
|
2020-10-10 22:13:09 +00:00
|
|
|
fmt.Println(version.commit)
|
|
|
|
fmt.Println(version.version)
|
|
|
|
fmt.Println(version.date)
|
2019-06-21 05:27:41 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println("Hello, World!")
|
|
|
|
}
|