utils

package
v0.0.0-...-dc36351 Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RecursionMaxDepth = 20

Functions

func FieldName

func FieldName(field structs.Field) string

FieldName returns the name of a field or an empty string if the field should be omitted.

Field should be omitted if specified by "json" tag or not exported.

Method follows rules of the "json" tag as described in encoding/json.Marshal except for the "string" flag.

func ToMap

func ToMap(s *structs.Struct) (map[string]interface{}, error)

ToMap proxy caller. Allows user not specify recursion max depth and use default RecursionMaxDepth instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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