structs

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckJsonTags

func CheckJsonTags(o interface{}) (errs []error)

CheckJSONTags checks that the json tags on a struct are present and in lower camel case format and reports violations as errors. The function will only produce meaningful results when a struct is passed in. It returns a nil empty slice when passed other types of values.

func Walk

func Walk(t reflect.Type, imap map[string][]reflect.Type) []string

walk recursively returns a list of field names contained in a given type. For fields of interface type, it iterates a list of candidate types which fulfil the interface, passed in in imap. TODO: pkg/test/util/populate should be refactored to use an imap argument too.

Types

This section is empty.

Jump to

Keyboard shortcuts

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