util

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package util implements the functions, types, and interfaces for the module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultComponent

func DefaultComponent[Map ~map[string]V, V any](ms Map, defaultNames ...string) (string, V, error)

DefaultComponent determines the default component from a map based on a prioritized list of names. If no name from defaultNames matches, and the map contains exactly one element, that element is returned. It returns the found component's name, the component itself, and an error if no default can be determined (e.g., multiple components exist without a matching default name).

Types

This section is empty.

Jump to

Keyboard shortcuts

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