Something went wrong. Try again.
cli + tui to publish to leaflet (wip) & manage tasks, notes & watch/read lists 🍃
charm leaflet readability golang
Something went wrong. Try again.
1234567891011121314151617181920212223242526package version
import "fmt"
var ( // Version is the semantic version (e.g., "1.0.0", "1.0.0-rc1") Version string = "dev" // Commit is the git commit hash Commit string = "none" // BuildDate is the build timestamp BuildDate string = "unknown")
// String returns a formatted version stringfunc String() string { if Version == "dev" && Commit != "none" { return fmt.Sprintf("%s+%s", Version, Commit) } return Version}
// UserAgent returns a formatted user agent string for HTTP requestsfunc UserAgent(appName, contactEmail string) string { return fmt.Sprintf("%s/%s (%s)", appName, Version, contactEmail)}