Code generation - godzie44/d3 GitHub Wiki

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