Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVersionConstraint ¶
CheckVersionConstraint checks if a version satisfies a constraint string. Returns true if the version is compatible, false otherwise. An empty constraint is always satisfied.
Supports common constraint operators:
- Comparison: >=, <=, <, >, ==, !=
- Caret (compatible): ^1.2 means >=1.2.0, <2.0.0
- Tilde (patch-level): ~1.2 or ~=1.2 means >=1.2.0, <1.3.0
Multiple constraints can be comma-separated (AND logic). OR groups are supported using "|" or "||" (Composer-style), where any group may match.
func ExtractMinVersion ¶
ExtractMinVersion extracts the minimum version from a constraint string. For constraints like ">=3.8", "^3.10", "~3.9", returns the version number. Returns empty string if no minimum version can be determined.
func NormalizeRuntimeConstraint ¶
NormalizeRuntimeConstraint normalizes runtime constraints to a comparable form. Bare versions like "1.70.0" are interpreted as minimum constraints (">=1.70.0").
Types ¶
This section is empty.