version

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version provides functionality for managing tool version information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	// Version is the explicit version string or the parsed result.
	Version string

	// Commands is a list of shell commands that can be used to determine the version.
	// Each command's output is matched against the version patterns.
	Commands unmarshal.SingleOrSliceType[string]

	// Patterns contains regex patterns for extracting version strings.
	// Used to parse version information from command output or other sources.
	Patterns unmarshal.SingleOrSliceType[string]
}

Version defines the target version of a tool, as well as how it can be parsed.

func (*Version) UnmarshalYAML

func (v *Version) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements custom YAML unmarshaling for Version configuration. Supports both scalar values (treated as explicit version) and map values with additional configuration for version detection and extraction.

Jump to

Keyboard shortcuts

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