Documentation ¶ Index ¶ func MustHaveTag(data interface{}, fieldName string) string func Tag(data interface{}, fieldName string) (string, error) 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. Source Files ¶ View all Source files bson_tags.go Click to show internal directories. Click to hide internal directories.