@@ -20,7 +20,6 @@ Generates objectbox related code for ObjectBox entities (Go structs)
20
20
It can be used by adding `//go:generate go run github.com/objectbox/objectbox-go/cmd/objectbox-gogen` comment inside a .go file
21
21
containing the struct that you want to persist and executing `go generate` in the module
22
22
23
-
24
23
Alternatively, you can run the command manually:
25
24
26
25
objectbox-gogen [flags] {source-file}
32
31
to remove the generated files instead of creating them - this removes *.obx.go and objectbox-model.go but keeps objectbox-model.json
33
32
34
33
path:
35
- * a source file path or a valid path pattern as accepted by the go tool (e.g. ./...)
36
- * if not given, the generator expects GOFILE environment variable to be set
34
+ - a source file path or a valid path pattern as accepted by the go tool (e.g. ./...)
35
+ - if not given, the generator expects GOFILE environment variable to be set
37
36
38
37
Available flags:
39
- -byValue
40
- getters should return a struct value (a copy) instead of a struct pointer
41
- -help
42
- print this help
43
- -out string
44
- output path for generated source files
45
- -persist string
46
- path to the model information persistence file (JSON)
47
- -version
48
- print the generator version info
49
38
39
+ -byValue
40
+ getters should return a struct value (a copy) instead of a struct pointer
41
+ -help
42
+ print this help
43
+ -out string
44
+ output path for generated source files
45
+ -persist string
46
+ path to the model information persistence file (JSON)
47
+ -version
48
+ print the generator version info
50
49
51
50
To learn more about different configuration and annotations for entities, see docs at https://golang.objectbox.io/
52
51
*/
53
52
package main
54
53
55
- import (
56
- "github.com/objectbox/objectbox-generator/cmd/objectbox-gogen"
57
- )
54
+ import gogen "github.com/objectbox/objectbox-generator/v4/cmd/objectbox-gogen"
58
55
59
56
func main () {
60
57
gogen .Main ()
0 commit comments