// Package version carries the build-time version information for the
// capacity planner binary.
package version

import (
	"fmt"
	"runtime"
)

// These variables are overridden at build time via -ldflags.
var (
	gitVersion = "v0.0.0"
	gitCommit  = "unknown"
	buildDate  = "unknown"
)

// Info returns a single-line version string for CLI/startup logging.
func Info() string {
	return fmt.Sprintf("capacity-planner %s (commit %s, built %s, %s/%s)",
		gitVersion, gitCommit, buildDate, runtime.GOOS, runtime.GOARCH)
}

// Version returns the build-time version tag, e.g. "v0.0.0" when unset.
func Version() string {
	return gitVersion
}

// Commit returns the build-time git commit, e.g. "unknown" when unset.
func Commit() string {
	return gitCommit
}
