github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/common/tools/configtxlator/metadata/metadata.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package metadata 8 9 import ( 10 "fmt" 11 "runtime" 12 ) 13 14 // package-scoped variables 15 16 // Package version 17 var Version string 18 19 // package-scoped constants 20 21 // Program name 22 const ProgramName = "configtxlator" 23 24 func GetVersionInfo() string { 25 if Version == "" { 26 Version = "development build" 27 } 28 29 return fmt.Sprintf("%s:\n Version: %s\n Go version: %s\n OS/Arch: %s", 30 ProgramName, Version, runtime.Version(), 31 fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)) 32 }