Comments (6)
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.
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.
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.
Hmm, replied via e-mail and lost all formatting :(
from cookoo.
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.
Just took a look and that's exactly how it should be
from cookoo.
Related Issues (14)
- Create execution context HOT 1
- Add console applications support
- Context.Add should be Context.Set HOT 1
- Error with ** path matching and path: in From clause
- CLI: Should be a datasource for getting os.Args
- Create base command HOT 1
- Create Registry HOT 1
- Create Router HOT 2
- Add Datasource support HOT 1
- Add event support HOT 1
- Add Request Resolver HOT 1
- Add logging support HOT 1
- Add HTTP Server support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookoo.