Skip to content

Code generation

Derevtsov Konstantin edited this page Aug 15, 2020 · 4 revisions

D3 uses code generation to extract entity metadata and get access to entity fields. D3 requires this code for every registered entity and will return an error if it doesn't find it. To generate code run d3 tool with parameter - a file or directory where entities exist. All entities must be a comment with "//d3:entity". Example:

Example:

d3 ./myPkg/entity.go
Clone this wiki locally