adminreadutil

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectLocaleCodes

func CollectLocaleCodes(ctx context.Context, ids []uuid.UUID, directCodes []string, resolver func(context.Context, uuid.UUID) (string, error)) []string

CollectLocaleCodes normalizes, deduplicates, and preserves locale order.

func DedupeLocalePreference

func DedupeLocalePreference(primaryID uuid.UUID, primaryCode string, fallbackID uuid.UUID, fallbackCode string) (uuid.UUID, string, uuid.UUID, string)

DedupeLocalePreference clears the fallback when it matches the primary locale.

func LocaleCodeByID

func LocaleCodeByID(ctx context.Context, id uuid.UUID, resolver func(context.Context, uuid.UUID) (string, error)) string

LocaleCodeByID resolves a locale code lazily using the supplied callback.

func MissingRequestedLocale

func MissingRequestedLocale(requested string, available []string) bool

MissingRequestedLocale reports whether a requested locale is absent from the available set.

func NormalizeLocale

func NormalizeLocale(code string) string

NormalizeLocale trims and canonicalizes locale codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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