option

package
v1.20.71 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Zlib Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter added in v1.8.32

func Filter(filter func(opt Option) bool, opts ...Option)

func Select added in v1.9.28

func Select[T any](t int, defValue T, opts ...Option) T

Types

type Opt added in v1.9.28

type Opt[T any] struct {
	// contains filtered or unexported fields
}

func (Opt[T]) String added in v1.9.28

func (o Opt[T]) String() string

func (Opt[T]) Type added in v1.9.28

func (o Opt[T]) Type() int

func (Opt[T]) Value added in v1.9.28

func (o Opt[T]) Value() interface{}

type Option

type Option interface {
	String() string
	Type() int
	Value() interface{}
}

func Exist added in v1.8.32

func Exist(ty int, opts ...Option) (Option, bool)

func WithOpt added in v1.9.28

func WithOpt[T any](v T, desc string, t int) Option

Jump to

Keyboard shortcuts

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