-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
35 lines (29 loc) · 807 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"runtime"
log "github.com/sirupsen/logrus"
"github.com/dealako/restapi/cmd"
)
// Build and version variables defined and set during the build process
var (
// Name the application name
name string
// Version the application version
version string
// Build/Commit the application build number
commit string
// Build date
buildDate string
)
func main() {
// Show the version and build info
log.Infof("Name : %s", name)
log.Infof("Version : %s", version)
log.Infof("Git commit hash : %s", commit)
log.Infof("Build date : %s", buildDate)
log.Infof("Golang OS : %s", runtime.GOOS)
log.Infof("Golang Arch : %s", runtime.GOARCH)
if err := cmd.RootCmd.Execute(); err != nil {
log.Fatal(err)
}
}