drive-health-metrics/version.go
James Coleman ddafa90a02
Some checks failed
Go package / build (push) Has been cancelled
first commit
2026-06-22 17:16:34 -05:00

24 lines
604 B
Go

package main
import "fmt"
// Build metadata injected at build time via -ldflags -X (see Makefile). version
// is sourced from the VERSION file so a single file is the authoritative version;
// commit and date are filled from git and the build clock.
var (
version = "dev"
commit = ""
date = ""
)
// printVersion writes the version line plus commit and build date when those
// were injected at build time.
func printVersion() {
fmt.Println("drive-health-metrics", version)
if commit != "" {
fmt.Printf(" commit: %s\n", commit)
}
if date != "" {
fmt.Printf(" built: %s\n", date)
}
}