# README
typemapper
Convention based code generator to simplify mapping between similar structs in Go.
Copying data between similar, but slightly different, structs is error-prone, especially as the size of struct increases. typemapper
simplifies the process using common conventions to automatically generate mapping functions and helps ensure no fields are left out the copying process but generating unit test files that fail when one is missed.
How it Works
See the Tutorial.
TODO
- Sync tutorial example files with markdown doc
# Functions
CreateMap initiates a mapping from the src type to the dst type.
IgnoreFields tells the map to ignore certain destination fields.
IgnoreUnexported tells the map to ignore unexported destination fields.
MapField tells the map to explicitly match fields that would otherwise not match.
MapWith provides additional mapping functions to use for type conversions.
RecognizePrefixes tells the map to match fields where the names match ignoring certain prefixes.