version

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentAPIVersion = "1.0.0"
	MinAPIVersion     = "1.0.0"
	MaxAPIVersion     = "1.99.99"
)

MOPS API version constants

Variables

This section is empty.

Functions

func CheckAPICompatibility

func CheckAPICompatibility(pluginAPIVersion string) error

CheckAPICompatibility checks if a plugin API version is compatible with MOPS

func GetCurrentAPIVersion

func GetCurrentAPIVersion() string

GetCurrentAPIVersion returns the current MOPS API version

Types

type Version

type Version struct {
	Major int
	Minor int
	Patch int
	Pre   string // Pre-release identifier
	Build string // Build metadata
}

Version represents a semantic version

func Parse

func Parse(s string) (*Version, error)

Parse parses a version string into a Version struct

func (*Version) Compare

func (v *Version) Compare(other *Version) int

Compare compares two versions Returns: -1 if v < other, 0 if v == other, 1 if v > other

func (*Version) IsCompatible

func (v *Version) IsCompatible(minVersion, maxVersion string) (bool, error)

IsCompatible checks if this version is compatible with the target version range

func (*Version) String

func (v *Version) String() string

String returns the string representation of the version

Jump to

Keyboard shortcuts

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