Help us shape the future of Go! Take the 2026 Go Developer Survey

core

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 3

README

core

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NULL interface{}

Functions

func Append

func Append[T comparable](vals []T, val T) []T

func Coalesce

func Coalesce[T any](vals ...T) T

func Compare

func Compare[T ORDERED](a, b T) int

func If

func If[T any](cond bool, a, b T) T

func IndexOf

func IndexOf[T comparable](vals []T, val T) int

func IsZeroValue

func IsZeroValue(x interface{}) bool

func Max

func Max[T NUMERIC](a, b T) T

func Min

func Min[T NUMERIC](a, b T) T

func Must

func Must[T any](val T, err error) T

func NewGUID

func NewGUID() string

func NewNonCancelableContext

func NewNonCancelableContext(ctx context.Context) context.Context

func ParseTags

func ParseTags(tags string) map[string]string

Types

type Boolean

type Boolean interface {
	Get(ctx context.Context) (bool, error)
}

type Duration

type Duration interface {
	Get(ctx context.Context) (time.Duration, error)
}

type Enumeration

type Enumeration[T comparable] interface {
	Get(ctx context.Context) (T, error)
}

type FLOAT

type FLOAT interface {
	~float64 | ~float32
}

type Float

type Float interface {
	Get(ctx context.Context) (float64, error)
}

type INTEGER

type INTEGER interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

type Integer

type Integer interface {
	Get(ctx context.Context) (int64, error)
}

type Json

type Json interface {
	Get(ctx context.Context) (json.RawMessage, error)
}

type NUMERIC

type NUMERIC interface {
	FLOAT | INTEGER
}

type ORDERED

type ORDERED interface {
	NUMERIC | ~string
}

type RWBoolean

type RWBoolean interface {
	Boolean
	Set(ctx context.Context, value bool) error
}

type RWDuration

type RWDuration interface {
	Duration
	Set(ctx context.Context, value time.Duration) error
}

type RWFloat

type RWFloat interface {
	Float
	Set(ctx context.Context, value float64) error
}

type RWInteger

type RWInteger interface {
	Integer
	Set(ctx context.Context, value int64) error
}

type RWJson

type RWJson interface {
	Json
	Set(ctx context.Context, value json.RawMessage) error
}

type RWString

type RWString interface {
	String
	Set(ctx context.Context, value string) error
}

type RWStrings

type RWStrings interface {
	Strings
	Set(ctx context.Context, value []string) error
}

type String

type String interface {
	Get(ctx context.Context) (string, error)
}

type Strings

type Strings interface {
	Get(ctx context.Context) ([]string, error)
}

Jump to

Keyboard shortcuts

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