Giter VIP home page Giter VIP logo

Comments (6)

AeroNotix avatar AeroNotix commented on June 15, 2024

Hi,

Not sure if this is still an issue however;

You shouldn't include src/ directories for Go projects into version control if you can help it. Fix:

cd $COOKOOWORKSPACE
mv src/* .

This way when you go get on the github.com/Masterminds/cookoo/ resource it'll find the go source files. If you wish to have go install-able applications, make them a path under github.com/Masterminds/cookoo/ and then you can go install like: go get github.com/Masterminds/cookoo/APP.

Hope that helps.

from cookoo.

technosophos avatar technosophos commented on June 15, 2024

Is there a good reference for the best way to structure a Go project? If I'm gonna start moving stuff around, I want to make sure I do it the right way this time.

from cookoo.

AeroNotix avatar AeroNotix commented on June 15, 2024

Hi,

http://golang.org/doc/code.html is my goto response.

I think mainly what people miss is what $GOPATH is and what's it's for. Mostly you never want more than one $GOPATH entry. It complicates a few things and some of the interactions with it are kind of subtle.

Essentially, src/ should never been in version control and any bintools you want to provide should be in a subdirectory which will also make them goinstallable. src/ shouldn't be in version control since the $GOPATH directory already has a src/ pkg/ and bin/ directory, having $GOPATH/src/package/src means you can't use it.

Hope that helps, take a look at some of my other Go projects (except freepoint, it's a hybrid project and thus isn't go get'able) for some inspiration. If you want a pull request for cookoo I can craft one but I am sure you'll be fine.

Regards,
Aaron

from cookoo.

AeroNotix avatar AeroNotix commented on June 15, 2024

Hmm, replied via e-mail and lost all formatting :(

from cookoo.

technosophos avatar technosophos commented on June 15, 2024

So all along I had been treating each Go project I was working on as if it were its own Go workspace. Then I was checking each workspace into Git. I see that I had it totally wrong. And, man, the tools work much better now. ;-)

from cookoo.

AeroNotix avatar AeroNotix commented on June 15, 2024

Just took a look and that's exactly how it should be 👍

from cookoo.

Related Issues (14)

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.