configset

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Empty = Set[struct{}]{
	Default: &struct{}{},
}

Functions

This section is empty.

Types

type Mode

type Mode string
const (
	Default Mode = "default"
	Dev     Mode = "dev"
	Test    Mode = "test"
)

func ParseMode

func ParseMode(s string) (Mode, error)

func (Mode) IsDefault

func (m Mode) IsDefault() bool

func (Mode) IsDev

func (m Mode) IsDev() bool

func (Mode) IsTest

func (m Mode) IsTest() bool

type Set

type Set[T any] struct {
	Default, Dev, Test *T
}

func (*Set[T]) Choose

func (set *Set[T]) Choose(mode Mode) (zero T, err error)

Jump to

Keyboard shortcuts

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