Skip to content

Go library for flattening structs with JSON tags

License

Notifications You must be signed in to change notification settings

darylnwk/flatten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Go library for flattening structs with JSON tags

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages