forked from okx/xlayer-bridge-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.go
More file actions
25 lines (22 loc) · 651 Bytes
/
version.go
File metadata and controls
25 lines (22 loc) · 651 Bytes
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
package zkevmbridgeservice
import (
"fmt"
"io"
"runtime"
)
// Populated during build, don't touch!
var (
Version = "v0.1.0"
GitRev = "undefined"
GitBranch = "undefined"
BuildDate = "Fri, 17 Jun 1988 01:58:00 +0200"
)
// PrintVersion prints version info into the provided io.Writer.
func PrintVersion(w io.Writer) {
fmt.Fprintf(w, "Version: %s\n", Version)
fmt.Fprintf(w, "Git revision: %s\n", GitRev)
fmt.Fprintf(w, "Git branch: %s\n", GitBranch)
fmt.Fprintf(w, "Go version: %s\n", runtime.Version())
fmt.Fprintf(w, "Built: %s\n", BuildDate)
fmt.Fprintf(w, "OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
}