mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
30 lines
510 B
Go
30 lines
510 B
Go
package proto
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
//TODO: remove this later.
|
|
//go:generate golangci-lint run --issues-exit-code=1 -D errcheck -E bodyclose .
|
|
|
|
var (
|
|
Version string
|
|
CommitID string
|
|
BranchName string
|
|
BuildTime string
|
|
)
|
|
|
|
func DumpVersion(role string) string {
|
|
return fmt.Sprintf("CubeFS %s\n"+
|
|
"Version : %s\n"+
|
|
"Branch : %s\n"+
|
|
"Commit : %s\n"+
|
|
"Build : %s %s %s %s\n",
|
|
role,
|
|
Version,
|
|
BranchName,
|
|
CommitID,
|
|
runtime.Version(), runtime.GOOS, runtime.GOARCH, BuildTime)
|
|
}
|