Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NodeAgent = Agent{ Version: NodeVersion, ProtocolVersion: 1, OS: runtime.GOOS, Arch: runtime.GOARCH, }
var NodeVersion = Version{
Major: 1,
Minor: 1,
Patch: 7,
Meta: "",
}
NodeVersion represents the current version of the node software. It should be updated with each new release, adjusting the Major, Minor, or Patch version numbers as necessary. When a major release occurs, the Meta field should be cleared (set to an empty string). For release candidates, set the Meta field to "rc1", "rc2", and so on. During development, set the Meta field to "beta".
Functions ¶
This section is empty.
Types ¶
type Agent ¶
func ParseAgent ¶ added in v1.1.1
ParseAgent parses a string into an Agent struct.
type Version ¶
type Version struct { Major uint // Major version number Minor uint // Minor version number Patch uint // Patch version number Meta string // Metadata for version (e.g., "beta", "rc1") }
These struct follow the semantic versioning 2.0.0 spec (http://semver.org/)
func ParseVersion ¶ added in v1.1.1
ParseVersion parses a version string into a Version struct. The format should be "Major.Minor.Patch-Meta", where Meta is optional. Returns the parsed Version struct and an error if parsing fails.