common

package
v0.0.0-...-1ab35b6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package common contains shared utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareByName

func CompareByName[T Nameable](a T, b T) int

CompareByName compares two `nameable` instances

func CompareToName

func CompareToName[T Nameable](e T, name string) int

CompareToName compares `T`'s name with `name`.

func EqualByName

func EqualByName[T Nameable](name string) func(e T) bool

EqualByName returns a comparator to check if `T` has `name`.

func GetOCIManifest

func GetOCIManifest(ociPath string) (*imgspecv1.Manifest, error)

GetOCIManifest returns the manifest for the given OCI image.

func Map

func Map[S ~[]T, T, V any](s S, fn func(T) V) []V

Map applies a function `fn` to all elements in the slice `s`.

func Names

func Names[T Nameable](seq iter.Seq[T]) iter.Seq[string]

Names returns an iterator for all the names in the sequence `seq`.

Types

type Nameable

type Nameable interface {
	GetName() string
}

Jump to

Keyboard shortcuts

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