maven

package
v1.5.48 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package maven contains supporting types and functions for working with maven data and APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version implements maven-style versions.

Maven versions have the extremely fun property of being arbitrarily long and arbitrarily nested. Put another way, maven versions are trees where both adding subtrees and modifying nodes have defined ordering semantics.

The wiki reference is also incorrect -- the comparison function is reverse-engineered from actual behavior rather than specified behavior.

See also: https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning See also: https://github.com/apache/maven/blob/maven-3.9.x/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java

func ParseVersion

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

ParseVersion parses the provided string as a maven version.

func (*Version) Compare

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

Compare implements the standard "compare" idiom.

  • < == -1
  • == == 0
  • > == 1.

func (*Version) String

func (v *Version) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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