Documentation
¶
Index ¶
- func AssertProvides[T comparable](t testing.TB, p cfg.Provider[T], expected T)
- func WriteTempFile(dir, data string) (string, error)
- type MapProvider
- func (m MapProvider) Bool(section string, keys ...string) cfg.Provider[bool]
- func (m MapProvider) Duration(section string, keys ...string) cfg.Provider[time.Duration]
- func (m MapProvider) Float64(section string, keys ...string) cfg.Provider[float64]
- func (m MapProvider) Get(key string, keys ...string) (any, error)
- func (m MapProvider) Int(section string, keys ...string) cfg.Provider[int]
- func (m MapProvider) Int64(section string, keys ...string) cfg.Provider[int64]
- func (m MapProvider) String(section string, keys ...string) cfg.Provider[string]
- func (m MapProvider) Uint64(section string, keys ...string) cfg.Provider[uint64]
- type UnexpectedTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertProvides ¶
func AssertProvides[T comparable](t testing.TB, p cfg.Provider[T], expected T)
AssertProvides calls t.Fatal if p.Provide doesn't return expected.
func WriteTempFile ¶
WriteTempFile creates a new temporary file under dir with the contents of data. The file name is returned.
Types ¶
type MapProvider ¶
type UnexpectedTypeError ¶
func NewUnexpectedTypeError ¶
func NewUnexpectedTypeError(expectedVal, providedVal interface{}) *UnexpectedTypeError
func (*UnexpectedTypeError) Error ¶
func (e *UnexpectedTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.