cli + tui to publish to leaflet (wip) & manage tasks, notes & watch/read lists 馃崈
charm leaflet readability golang
at main 25 lines 625 B view raw
1package version 2 3import "fmt" 4 5var ( 6 // Version is the semantic version (e.g., "1.0.0", "1.0.0-rc1") 7 Version string = "dev" 8 // Commit is the git commit hash 9 Commit string = "none" 10 // BuildDate is the build timestamp 11 BuildDate string = "unknown" 12) 13 14// String returns a formatted version string 15func String() string { 16 if Version == "dev" && Commit != "none" { 17 return fmt.Sprintf("%s+%s", Version, Commit) 18 } 19 return Version 20} 21 22// UserAgent returns a formatted user agent string for HTTP requests 23func UserAgent(appName, contactEmail string) string { 24 return fmt.Sprintf("%s/%s (%s)", appName, Version, contactEmail) 25}