bsonutil

package
v0.0.0-...-900fa13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustHaveTag

func MustHaveTag(data interface{}, fieldName string) string

MustHaveTag gets the "bson" struct tag for a field, panicking if either the field does not exist or has no "bson" tag.

func Tag

func Tag(data interface{}, fieldName string) (string, error)

Tag returns the value of the "bson" tag for the given struct field name of the "data" struct, stripping any tag modifiers such as "omitempty". Returns the empty string if there is no tag, and an error if the field does not exist in the struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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