Documentation
¶
Overview ¶
Package version provides version information for the Gorilla DataFrame library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" BuildDate = unknownValue GitCommit = unknownValue GitTag = unknownValue GoVersion = runtime.Version() )
Build-time variables set by ldflags. These global variables are required for build-time injection via ldflags. Refactoring these to non-global would break the Makefile's -ldflags -X functionality.
Functions ¶
func IsPreRelease ¶
func IsPreRelease() bool
IsPreRelease returns true if this is a pre-release version.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string `json:"version"`
BuildDate string `json:"build_date"`
GitCommit string `json:"git_commit"`
GitTag string `json:"git_tag"`
GoVersion string `json:"go_version"`
BuildTime time.Time `json:"build_time"`
Dirty bool `json:"dirty"`
Main Module `json:"main"`
Deps []Module `json:"deps"`
Settings []Setting `json:"settings"`
}
BuildInfo contains detailed build information.
type Module ¶
type Module struct {
Path string `json:"path"`
Version string `json:"version"`
Sum string `json:"sum"`
}
Module represents a Go module with version information.
type SemVer ¶
SemVer represents semantic version components.
func ParseSemVer ¶
ParseSemVer parses a semantic version string using a simplified parser.
This implementation handles basic semantic version parsing for build information and version comparison. For production applications requiring strict SemVer compliance, consider using a dedicated library like github.com/Masterminds/semver.
Supported format: [v]MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]
Examples:
- "1.0.0" -> SemVer{Major: 1, Minor: 0, Patch: 0}
- "v2.1.3-alpha.1" -> SemVer{Major: 2, Minor: 1, Patch: 3, PreRelease: "alpha.1"}
- "1.0.0+build.1" -> SemVer{Major: 1, Minor: 0, Patch: 0, Build: "build.1"}