Categorygithub.com/rusq/tagops
modulepackage
0.0.2
Repository: https://github.com/rusq/tagops.git
Documentation: pkg.go.dev

# README

tagops

Tagops is a Go library containing a set of utilities for transforming struct fields into maps.

License: MIT

# Functions

Flatten returns an Option that sets the Flatten option to true.
Keys returns a sorted list of keys for the map m.
MapValues populates slice out with values from map m in the key order specified by order.
New returns a new Mapper with options opts.
Omitempty sets the Omitempty option to true.
PrepareToMap returns a ToMap function with options set by opts.
Tag returns an Option that sets the Tag to tag.
Tags returns a sorted list of names in tags, given a struct object.
ToMap converts an argument a which should be some struct type, to a map[tag]value.
Values returns values for the struct object a, given a tag.

# Structs

Mapper is a struct to map struct fields to map key/values.

# Type aliases

Option is a functional option for Mapper.