flatten

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 4 Imported by: 0

README

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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeFormat = time.RFC3339Nano

TimeFormat defines default time format when unmarshalling time.Time

Override this to unmarshal time.Time to a different format

Functions

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`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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