Documentation
¶
Overview ¶
Package semver provides thin helpers for semver constraint checking, wrapping golang.org/x/mod/semver and implementing caret (^) and tilde (~) range semantics as used in melon.yaml dependency constraints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCompatible ¶
IsCompatible reports whether version satisfies constraint.
Supported constraint prefixes:
- "^X.Y.Z" caret — compatible with X.Y.Z; allows patch and minor bumps within the same major version (^1.2.3 matches >=1.2.3, <2.0.0). Special case: when major is 0, only patch bumps are allowed (^0.2.3 matches >=0.2.3, <0.3.0).
- "~X.Y.Z" tilde — allows patch bumps only (~1.2.3 matches >=1.2.3, <1.3.0).
- "X.Y.Z" exact match (no prefix).
Both constraint and version may omit the leading "v".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.