github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/common/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  	"github.com/hyperledger/fabric/common/metadata"
    14  )
    15  
    16  const ProgramName = "orderer"
    17  
    18  var Version = metadata.Version
    19  
    20  func GetVersionInfo() string {
    21  	return fmt.Sprintf(
    22  		"%s:\n Version: %s\n Commit SHA: %s\n Go version: %s\n OS/Arch: %s\n",
    23  		ProgramName,
    24  		Version,
    25  		metadata.CommitSHA,
    26  		runtime.Version(),
    27  		fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
    28  	)
    29  }