qtmeta

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLTS

func IsLTS(s string) bool

IsLTS reports whether a version is a known LTS release.

func MajorVersion

func MajorVersion(s string) int

MajorVersion returns the major version number from a version string. Returns 0 if parsing fails.

func NormalizeTarget

func NormalizeTarget(s string) string

NormalizeTarget normalises target strings (e.g. trims whitespace, lowercases).

Types

type TargetMeta

type TargetMeta struct {
	Name        string
	DisplayName string
	OS          TargetOS
}

TargetMeta holds metadata about a Qt target/architecture.

func LookupTarget

func LookupTarget(name string) (TargetMeta, bool)

LookupTarget returns metadata for a target string.

type TargetOS

type TargetOS string

TargetOS represents the operating system component of a target string.

const (
	Windows TargetOS = "windows"
	Linux   TargetOS = "linux"
	MacOS   TargetOS = "macos"
)

type Version

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

Version represents a parsed Qt version number.

func MustParseVersion

func MustParseVersion(s string) Version

MustParseVersion is like ParseVersion but panics on error.

func ParseVersion

func ParseVersion(s string) (Version, error)

ParseVersion parses a Qt version string like "6.10.0". Requires exactly three dot-separated numeric components.

func (Version) Compare

func (v Version) Compare(other Version) int

Compare returns negative, zero, or positive depending on whether v < other, v == other, or v > other.

func (Version) GTE

func (v Version) GTE(other Version) bool

GTE reports whether v is greater than or equal to other.

func (Version) Less

func (v Version) Less(other Version) bool

Less reports whether v is older than other.

func (Version) Major

func (v Version) Major() int

Major returns the major version number.

func (Version) Minor

func (v Version) Minor() int

Minor returns the minor version number.

func (Version) Patch

func (v Version) Patch() int

Patch returns the patch version number.

func (Version) String

func (v Version) String() string

String returns the version as "major.minor.patch".

type VersionFilter

type VersionFilter struct {
	Major    int
	Minor    int
	Patch    int
	HasMinor bool
	HasPatch bool
}

VersionFilter represents a partial or full version specification used for filtering. It can match major-only ("6"), major.minor ("6.9"), or exact major.minor.patch ("6.9.0").

func ParseVersionFilter

func ParseVersionFilter(s string) (VersionFilter, error)

ParseVersionFilter parses a partial or full version string. Accepted formats: "6", "6.9", "6.9.0".

func (VersionFilter) IsFullVersion

func (vf VersionFilter) IsFullVersion() bool

IsFullVersion returns true if the filter specifies all three components.

func (VersionFilter) Matches

func (vf VersionFilter) Matches(v Version) bool

Matches reports whether a parsed Version matches this filter.

func (VersionFilter) MatchesString

func (vf VersionFilter) MatchesString(version string) bool

MatchesString reports whether a version string like "6.9.0" matches this filter.

func (VersionFilter) String

func (vf VersionFilter) String() string

String returns the filter as originally specified (e.g. "6", "6.9", "6.9.0").

Jump to

Keyboard shortcuts

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