github.com/operator-framework/operator-lifecycle-manager@v0.30.0/pkg/version/version.go (about) 1 package version 2 3 import "fmt" 4 5 // OLMVersion indicates what version of OLM the binary belongs to 6 var OLMVersion string 7 8 // GitCommit indicates which git commit the binary was built from 9 var GitCommit string 10 11 // String returns a pretty string concatenation of OLMVersion and GitCommit 12 func String() string { 13 return fmt.Sprintf("OLM version: %s\ngit commit: %s\n", OLMVersion, GitCommit) 14 } 15 16 // Full returns a hyphenated concatenation of just OLMVersion and GitCommit 17 func Full() string { 18 return fmt.Sprintf("%s-%s", OLMVersion, GitCommit) 19 }