1 // Copyright (c) 2019 Cisco and/or its affiliates.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at:
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
26 version = "v0.0.0+unknown"
27 commitHash = "unknown"
37 buildstampInt64, _ := strconv.ParseInt(buildStamp, 10, 64)
38 if buildstampInt64 == 0 {
39 buildstampInt64 = time.Now().Unix()
41 buildDate = time.Unix(buildstampInt64, 0)
45 return fmt.Sprintf(`%s %s`, name, version)
48 func Verbose() string {
49 return fmt.Sprintf(`%s
55 Go runtime: %s (%s/%s)`,
57 version, buildBranch, commitHash,
58 buildUser, buildHost, buildDate.Format(time.UnixDate),
59 runtime.Version(), runtime.GOOS, runtime.GOARCH,