Skip to content

Commit 7bac7e9

Browse files
dan-obxgreenrobot
authored andcommitted
update dependency to objectbox-generator v4
1 parent c6d6cc8 commit 7bac7e9

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

cmd/objectbox-gogen/objectbox-gogen.go

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Generates objectbox related code for ObjectBox entities (Go structs)
2020
It can be used by adding `//go:generate go run github.com/objectbox/objectbox-go/cmd/objectbox-gogen` comment inside a .go file
2121
containing the struct that you want to persist and executing `go generate` in the module
2222
23-
2423
Alternatively, you can run the command manually:
2524
2625
objectbox-gogen [flags] {source-file}
@@ -32,29 +31,27 @@ or
3231
to remove the generated files instead of creating them - this removes *.obx.go and objectbox-model.go but keeps objectbox-model.json
3332
3433
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
3736
3837
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
4938
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
5049
5150
To learn more about different configuration and annotations for entities, see docs at https://golang.objectbox.io/
5251
*/
5352
package main
5453

55-
import (
56-
"github.com/objectbox/objectbox-generator/cmd/objectbox-gogen"
57-
)
54+
import gogen "github.com/objectbox/objectbox-generator/v4/cmd/objectbox-gogen"
5855

5956
func main() {
6057
gogen.Main()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ go 1.11
44

55
require (
66
github.com/google/flatbuffers v23.5.26+incompatible
7-
github.com/objectbox/objectbox-generator v0.14.0
7+
github.com/objectbox/objectbox-generator/v4 v4.0.0-alpha3
88
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg=
22
github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
3-
github.com/objectbox/objectbox-generator v0.14.0 h1:+fr7vOFsdz7d/HWZN3ZLjLnGJ8TviliRyeBHlkL/J40=
4-
github.com/objectbox/objectbox-generator v0.14.0/go.mod h1:yMFFd/okhMBw02p6ZJJAmfblqyoQHjfYJie95DQbGn0=
3+
github.com/objectbox/objectbox-generator/v4 v4.0.0-alpha3 h1:TkAaunfhRUwga/8QIhj2VC37M85q4UAyhSrA6THtD7M=
4+
github.com/objectbox/objectbox-generator/v4 v4.0.0-alpha3/go.mod h1:paUROSAShse/S8vIhpCyg6leDlZR/C7zOusTeK5YOEY=

objectbox/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"fmt"
2727
"unsafe"
2828

29-
"github.com/google/flatbuffers/go"
30-
"github.com/objectbox/objectbox-generator/cmd/objectbox-gogen"
29+
flatbuffers "github.com/google/flatbuffers/go"
30+
gogen "github.com/objectbox/objectbox-generator/v4/cmd/objectbox-gogen"
3131
)
3232

3333
// ObjectBinding provides an interface for various object types to be included in the model

0 commit comments

Comments
 (0)