version

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version owns the Version struct plus Parse/String helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major int
	Minor int
	Fix   int
}

Version carries a router or plugin API number.

func Parse

func Parse(version string) (Version, error)

Parse builds a Version from "X.Y[.Z]" with an optional "v" prefix. "X.Y" reads as Fix 0. Extra whitespace around components is allowed.

func (Version) String

func (v Version) String() string

String renders "X.Y" when Fix is 0, otherwise "X.Y.Z".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL