Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustHaveTag ¶
MustHaveTag gets the "bson" struct tag for a field, panicking if either the field does not exist or has no "bson" tag.
func Tag ¶
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.
If data is a slice of structs, this check applies to the type of struct in the slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.