Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.gitignore | H A D | 25-Jun-2019 | 32 | |||
LICENSE | H A D | 25-Jun-2019 | 1 KiB | |||
README.md | H A D | 25-Jun-2019 | 959 | |||
common.go | H A D | 25-Jun-2019 | 1.5 KiB | |||
common_test.go | H A D | 25-Jun-2019 | 2.1 KiB | |||
decode.go | H A D | 25-Jun-2019 | 3.3 KiB | |||
decode_test.go | H A D | 25-Jun-2019 | 3.1 KiB | |||
go.mod | H A D | 25-Jun-2019 | 174 | |||
go.sum | H A D | 25-Jun-2019 | 1 KiB | |||
reflect.go | H A D | 25-Jun-2019 | 4.9 KiB | |||
reflect_test.go | H A D | 25-Jun-2019 | 1.6 KiB | |||
value.go | H A D | 25-Jun-2019 | 3.1 KiB |
README.md
1# Structs 2 3[![GoDoc](https://godoc.org/github.com/zeebo/structs?status.svg)](https://godoc.org/github.com/zeebo/structs) 4[![Sourcegraph](https://sourcegraph.com/github.com/zeebo/structs/-/badge.svg)](https://sourcegraph.com/github.com/zeebo/structs?badge) 5[![Go Report Card](https://goreportcard.com/badge/github.com/zeebo/structs)](https://goreportcard.com/report/github.com/zeebo/structs) 6 7## Usage 8 9#### type Option 10 11```go 12type Option interface { 13 // contains filtered or unexported methods 14} 15``` 16 17Option controls the operation of a Decode. 18 19#### type Result 20 21```go 22type Result struct { 23 Error error 24 Used map[string]struct{} 25 Missing map[string]struct{} 26 Broken map[string]struct{} 27} 28``` 29 30Result contains information about the result of a Decode. 31 32#### func Decode 33 34```go 35func Decode(input map[string]interface{}, output interface{}, opts ...Option) Result 36``` 37Decode takes values out of input and stores them into output, allocating as necessary. 38