This is a fork of github.com/sevlyar/retag.
Package retag provides an ability to change tags of structures' fields in runtime without copying of the data. It may be helpful in next cases:
- Automatic tags generation;
- Different views of the one data;
- Fixing of leaky abstractions with minimal boilerplate code when application has layers of abstractions and model is separated from storages and presentation layers.
Please see examples in documentation for details.
Features:
- No memory allocations (for cached types);
- Fast converting (lookup in table and pointer creation for cached types);
- Works with complex and nested types (e.g.
map[struct]*struct
).
go get github.com/jarrodhroberson/retag
You can use gopkg.in:
go get gopkg.in/jarrodhroberson/retag.v0
Please see godoc.org/github.com/jarrodhroberson/retag