/structs

Provides a way to unmarshal data into structs

Primary LanguageGoMIT LicenseMIT

Structs

GoDoc Sourcegraph Go Report Card

Usage

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option controls the operation of a Decode.

type Result

type Result struct {
	Error   error
	Used    map[string]struct{}
	Missing map[string]struct{}
	Broken  map[string]struct{}
}

Result contains information about the result of a Decode.

func Decode

func Decode(input map[string]interface{}, output interface{}, opts ...Option) Result

Decode takes values out of input and stores them into output, allocating as necessary.