configutils

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NilSentinelHook added in v0.0.15

func NilSentinelHook(_, _ reflect.Type, data any) (any, error)

Types

type Comp added in v0.0.17

type Comp[RawT Compilable[CompiledT], CompiledT any] struct {
	Raw *RawT
	// contains filtered or unexported fields
}

func (*Comp[RawT, CompiledT]) Compile added in v0.0.17

func (c *Comp[RawT, CompiledT]) Compile() CompiledT

func (*Comp[RawT, CompiledT]) UnmarshalMapstructure added in v0.0.17

func (c *Comp[RawT, CompiledT]) UnmarshalMapstructure(raw any) error

type Compilable added in v0.0.17

type Compilable[CompiledT any] interface {
	Compile() CompiledT
}

type NilSentinel added in v0.0.15

type NilSentinel struct{}

type Opt

type Opt[T any] struct {
	Set   bool
	Value *T
}

func (Opt[T]) OptOrEmpty added in v0.0.11

func (optional Opt[T]) OptOrEmpty(fallback Opt[T]) T

Returns optional.Value (if set) or fallback.Value (if set), else T empty is returned

func (Opt[T]) OptOrFallback added in v0.0.11

func (optional Opt[T]) OptOrFallback(fallback Opt[T]) T

Returns optional.Value (if set) or fallback.Value

func (*Opt[T]) UnmarshalMapstructure

func (optional *Opt[T]) UnmarshalMapstructure(raw any) error

func (Opt[T]) ValueOrFallback added in v0.0.11

func (optional Opt[T]) ValueOrFallback(fallback T) T

Returns optional.Value (if set) or fallback

Jump to

Keyboard shortcuts

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