fn

package module
v0.0.0-...-726fd98 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: MIT Imports: 1 Imported by: 6

README

fn

Helpers for functional options pattern in Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("key not found")
)

Functions

This section is empty.

Types

type Config

type Config map[string]interface{}

func MakeConfig

func MakeConfig(defaults Defaults, options []Option) Config

func (Config) Get

func (c Config) Get(key string) interface{}

func (Config) GetString

func (c Config) GetString(key string) string

func (Config) Upsert

func (c Config) Upsert(key string, value interface{})

type Defaults

type Defaults Config

type Option

type Option func(Config)

func MakeOption

func MakeOption(key string, value interface{}) Option

Jump to

Keyboard shortcuts

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