mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
18 lines
260 B
Go
18 lines
260 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
const Version = "devel"
|
|
|
|
func Print() {
|
|
if Version == "devel" {
|
|
fmt.Printf("%s (no version)\n", filepath.Base(os.Args[0]))
|
|
} else {
|
|
fmt.Printf("%s %s\n", filepath.Base(os.Args[0]), Version)
|
|
}
|
|
}
|