semver

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package semver is the single source of truth for semver tag handling shared by the CLI/OCI resolver and the dashboard data sources. Both must filter, sort, and pick "latest" identically so a service never appears or vanishes depending on which component or source answered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(tags []string) []string

Filter returns only valid semver tags, sorted descending (latest first). Non-semver tags are dropped. Returns nil when no tags are valid semver.

func Latest

func Latest(tags []string) string

Latest returns the highest valid semver tag, or "" if none are valid semver.

func LessDesc

func LessDesc(a, b string) bool

LessDesc reports whether tag a should sort before tag b in descending order (latest first). Valid semver sorts before invalid; two invalid tags fall back to reverse-lexicographic order. Use as the less-func for sorting mixed lists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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