rule

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rule compiles a directive's selection-policy keys (constraint, include/exclude, prerelease, cooldown, behind, downgrade) into the options the version selection chain consumes. It is the bridge between the directive grammar and version.Select: the directive layer enforces value types, this layer enforces each key's meaning (e.g. behind must be non-negative, include/exclude compile to pattern predicates).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(d directive.Directive, current *version.Version) ([]version.Option, error)

Compile turns a directive's rule keys into options for version.Select. current anchors a keyword constraint. It fails loud on an unparseable value or a value out of its key's range, so a bad rule is surfaced rather than silently ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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