Documentation
¶
Overview ¶
Package version exposes build-time identifiers stamped via -ldflags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" Commit = "none" BuildDate = "unknown" )
Populated by the build via -ldflags. Defaults make `go run` informative even without -ldflags.
Version is the output of `git describe --tags --always`: a semver tag (e.g. "v0.2.0"), a tag plus distance (e.g. "v0.2.0-3-gf1fd170"), or — when no tag is reachable from HEAD — a bare short commit hash (e.g. "f1fd170").
Functions ¶
func CompareVersions ¶
CompareVersions compares two "vX.Y.Z" semver strings. Returns -1 (current<latest), 0 (equal), 1 (current>latest). "dev"/"none"/empty current → -1.
func Display ¶
func Display() string
Display returns the human-facing version label, used for the startup banner and `dsc version`. It guarantees exactly one "v" prefix for a semver-shaped Version and never fakes one for an untagged build:
"v0.2.0" → "v0.2.0" (already prefixed by git describe) "v0.2.0-3-gf1fd170" → "v0.2.0-3-gf1fd170" "0.2.0" → "v0.2.0" (tag created without the "v") "f1fd170" → "build f1fd170" (bare commit hash — not a version) "dev" / "none" / "" → "dev"
The callers must NOT prepend their own "v"; doing so used to render a bare commit hash as a pseudo-version ("v0612286") and would double-prefix a real tag ("vv0.2.0").
func LatestRelease ¶
LatestRelease queries GitHub for the newest release of amemiya02/deepseekcode.
Types ¶
type Method ¶
type Method string
func DetectInstallMethod ¶
DetectInstallMethod infers the install method from the resolved executable path. Callers must filepath.EvalSymlinks before passing.