Version
Overview
Version is a semantic version.
Part of the semver package — Node.js analog: semver.
Version is a type exported by gox. Methods on this type are documented separately.
Signature
go
type Version struct {
// contains filtered or unexported fields
}Compare: Node.js · Standard Go · gox
js
// Typical semver pattern in Node.jsgo
// github.com/Masterminds/semver/v3go
import "github.com/sahilkhaire/gox/semver"
v, err := semver.Parse("1.2.3")
if err != nil {
return err
}Example
go
import "github.com/sahilkhaire/gox/semver"
v, err := semver.Parse("1.2.3")
if err != nil {
return err
}Tips
Browse methods on this type in the sidebar for handler-style APIs and options structs.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.