Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ Additionally to the `task.obx.go` there's an `objectbox-model.json` which holds

## Initializing ObjectBox

To use ObjectBox in our main application code, we use `Builder` and give it model information and optionally some other settings. The code with the model information is generated by the ObjectBox and you just need to use in your code:
To use ObjectBox in our main application code, we use `Builder` and give it model information and optionally some other settings. The code with the model information is generated by ObjectBox and you just need to use it in your code:

{% hint style="warning" %}
Replace `github.com/my-org/my-project` below with your own Go module name (as defined in your `go.mod` file).
{% endhint %}

```go
import (
"github.com/objectbox/objectbox-go/objectbox"
"github.com/objectbox/objectbox-go/examples/tasks/internal/model"
"github.com/my-org/my-project/internal/model"
)

func initObjectBox() *objectbox.ObjectBox {
Expand Down