Git Product home page Git Product logo

Comments (4)

vaind avatar vaind commented on May 20, 2024

I guess the code block in this section is the culprit, right?. We should think about how to change the imports in the docs so that it's clear user needs to actually change them to their module path...

from objectbox-go.

FriesK1 avatar FriesK1 commented on May 20, 2024

I guess the code block in this section is the culprit, right?. We should think about how to change the imports in the docs so that it's clear user needs to actually change them to their module path...

I am not sure if this is a documentation only issue or not. I was able to work around the issue by using direct paths, but this is considered extremely bad form. The code we need to include should be generated into a vendor folder and documentation should be adjusted to identify the proper path from there, and vendoring needs to be turned on during installation, creating a go dependency issue.

This is probably not simply a documentation issue if done correctly due to changes in the language.

from objectbox-go.

vaind avatar vaind commented on May 20, 2024

... The code we need to include...

That's exactly the misunderstanding I think needs addressing in the docs. You don't need to include any code from "github.com/objectbox/objectbox-go/examples/tasks/internal/model" - the whole "example/tasks" folder is an example of a self-contained application. You can copy-paste it, initialize it as your own go module (picking your own name, for example, github.com/FriesK1/objectbox-playground) and replace all the imports with the module name you've chosen (e.g. github.com/FriesK1/objectbox-playground).

from objectbox-go.

sgbell avatar sgbell commented on May 20, 2024

Just to throw in my 2 cents on this..
I couldn't get the command:
go generate ./...
working until I tried to run the command:

go test github.com/objectbox/objectbox-go

Running that command, then informed me of the commands I need to run to get objectbox-go working:

go get github.com/objectbox/objectbox-go go get github.com/objectbox/objectbox-go/cmd/[email protected] go get github.com/objectbox/objectbox-go/examples/tasks/internal/[email protected]

After installing those packages

go generate ./...

worked, and I was able to work with the package.

I'm new to golang, and it took me a few hours of messing around, to finally give the go test command a try, as I assumed I could just jump straight in.

from objectbox-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.