contained

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncompatibleInterface = errors.New("could not decode interface into Value")

Functions

func TestRuneFromIFace

func TestRuneFromIFace(t *testing.T)

Types

type ContainedTypeInfo

type ContainedTypeInfo[T comparable] struct {
	Description string
	FromIFace   func(iFace interface{}) (T, error)
	FromString  func(string) (T, error)
	// Initalized to the Empty value, but used for updating stuff in the container type
	Empty func() T
}

func Bool

func Bool() ContainedTypeInfo[bool]

func Duration

func Duration() ContainedTypeInfo[time.Duration]

func Int

func Int() ContainedTypeInfo[int]

func Path

func Path() ContainedTypeInfo[string]

func Rune

func Rune() ContainedTypeInfo[rune]

func String

func String() ContainedTypeInfo[string]

Jump to

Keyboard shortcuts

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