Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 442 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 442 Bytes

flatten

-- import "github.com/darylnwk/flatten"

Usage

var TimeFormat = time.RFC3339Nano

TimeFormat defines default time format when unmarshalling time.Time

Override this to unmarshal time.Time to a different format

func Struct

func Struct(s interface{}, m map[string]interface{})

Struct parses a struct s with JSON tags and flattens nested parameters to only one level and passes the result to m.