github.com/stampzilla/stampzilla-go@v2.0.0-rc9+incompatible/pkg/build/build.go (about)

     1  package build
     2  
     3  import "fmt"
     4  
     5  // Version is used by CI/CD system to set the version of the built binary
     6  var Version = "dev"
     7  
     8  // BuildTime is the time of this build
     9  var BuildTime = ""
    10  
    11  // Commit contains the SHA commit hash
    12  var Commit = ""
    13  
    14  // String returns the version info as a string
    15  func String() string {
    16  	return fmt.Sprintf(`Version: "%s", BuildTime: "%s", Commit: "%s" `, Version, BuildTime, Commit)
    17  }