utils

package
v0.0.0-...-3ee1a1a Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFlatName

func CheckFlatName(s string, msg string, args ...interface{}) error

func CheckNonEmpty

func CheckNonEmpty(s string, msg string, args ...interface{}) error

func CheckValues

func CheckValues(s string, msg string, values ...string) error

func CheckVersion

func CheckVersion(v string, msg string, args ...interface{}) error

func CheckVersionConstraint

func CheckVersionConstraint(v string, msg string, args ...interface{}) error

func Compare

func Compare[T Comparable[T]](a, b any) int

func Convert

func Convert[T, S any](in []S) []T

func Crop

func Crop(s string, n int) string

func IsAlphaNumeric

func IsAlphaNumeric(s string) bool

func Parse

func Parse[T any, P parsablePointer[T]](s string) (P, error)

Types

type Comparable

type Comparable[T any] interface {
	Compare(T) int
}

type Copyable

type Copyable[T any] interface {
	Copy() *T
}

type CopyableList

type CopyableList[T Copyable[T]] []T

func (CopyableList[T]) Copy

func (l CopyableList[T]) Copy() CopyableList[T]

type Parseable

type Parseable interface {
	Parse(string) error
}

type StringMap

type StringMap map[string]string

func (StringMap) Copy

func (m StringMap) Copy() StringMap

Jump to

Keyboard shortcuts

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