You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dev_tools/goMaker/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
##goMaker
1
+
# goMaker
2
2
3
3
`goMaker` is development-only tool that aids in various aspects of building TrueBlocks. The program is
4
4
disabled for most users, but for core developers it can be used to automatically generate help files,
5
5
API interface specs, command line options parsers and many of the test case files. Generally, regular
6
6
users will not use `goMaker`.
7
7
8
-
###Usage
8
+
## Usage
9
9
10
10
`Usage:` goMaker
11
11
`Purpose:` Automatically writes files for various purposes.
@@ -56,7 +56,7 @@ with the following fields:
56
56
-`note` - a note (used for documentation only, this appears in the notes section of the READMEs)
57
57
-`alias` - an alias (used for the Hugo website only, this aliases old pages)
58
58
59
-
###Notes on Data Models
59
+
## Notes on Data Models
60
60
61
61
The `goMaker` program also generates a huge number of source code files and documentation related to the various data models produced or consumed by the various TrueBlocks tools. These data models are stored in `.toml` files in the `./src/dev_tools/goMaker/templates/classDefinitions` folder and the model's fields (in a `.csv`) are stored in a subfolder called `fields`. There are two files for each data model (a `.toml` and a `.csv`) names identically to the data model's name.
62
62
@@ -75,10 +75,10 @@ The `.toml` file contains the following fields:
75
75
| cache_by | the fields by which to identify cache items | (one of \[`address`\|`address,block`\|`address,block,fourbyte`\|`address,tx`\|`block`\|`tx`\]|
76
76
| cache_type | one of \[`cacheable`\|`marshal_only`\]||
77
77
78
-
###Notes on Templates
78
+
## Notes on Templates
79
79
80
80
The `./src/dev_tools/goMaker/templates` folder also contains a number of templates used by the `goMaker` program. The names of these templates corresponds to the location in the repo's paths the generated files will be written. For example, the `./sdk_route.go.tmpl` writes files to the `./sdk` folder. The filename of the file is `<route>.go` where `<route>` is the route of the subcommand. The template name may contain the word "route" or the word "type" which is sequentially replaced with either the routes or the data model types.
"description": "A development tool that aids in various aspects of building TrueBlocks by automatically generating help files, API interface specs, command line options parsers and test case files",
5
+
"main": "main.go",
6
+
"scripts": {
7
+
"build": "mkdir -p bin && go build -o bin/goMaker main.go",
0 commit comments