package version var ( // Version is the current version of the application Version = "0.1.0" // GitCommit is the git commit hash GitCommit = "" // BuildDate is the date when the binary was built BuildDate = "" ) // GetVersion returns the complete version information func GetVersion() string { version := Version if GitCommit != "" { version += " (" + GitCommit + ")" } if BuildDate != "" { version += " built on " + BuildDate } return version }