Comments (7)
Aha, thanks for the details. Yes, I'll do this. I had no idea about what I was doing :-P
from sourcachefs.
OK, this may be a stupid question... but how do I build my own code from HEAD if I do this?
go build cmd/sourcachefs
or similar all fail. Am I supposed to just check out my code into the GOPATH
(by means of go get
) and edit it from there? Yikes.
from sourcachefs.
go install github.com/jmmv/sourcachefs/cmd/sourcachefs
is what Iβd use. The binary will end up in $GOPATH/bin
.
Alternatives:
(cd cmd/sourcachefs && go build)
go build ./cmd/sourcachefs
(this will store the result in $PWD, which might not be what you want)
from sourcachefs.
I can see how "end users" will be able to just fetch the code and build/install it with go build
and go install
if I follow your proposal.
But that's not the problem I have. What I'm talking with "building from HEAD" is... I do:
cd ~/os
# Directory where I keep all my projects.git clone https://github.com/jmmv/sourcachefs
cd sourcachefs
go build ???
# What goes here?
If I try the go build ./cmd/sourcachefs
that you mention, Go does indeed find the code... but then, it of course complains about all imports of the form github.com/jmmv/sourcachefs/...
to be missing.
from sourcachefs.
Ah: you need to keep the project in your $GOPATH. You could use:
export GOPATH=~/os
cd ~/os
mkdir -p src/github.com/jmmv
cd src/github.com/jmmv
git clone [email protected]:jmmv/sourcachefs
# β¦
(Instead of manually creating the directory and cloning, you could also just use go get -u github.com/jmmv/sourcachefs
, then change the git remote to authenticated in order to be able to push.)
from sourcachefs.
I think this is now resolved.
from sourcachefs.
Almost: you need a subdirectory within cmd/. Currently, your code is compiled into $GOPATH/bin/cmd. I think it should be cmd/sourcachefs/?
from sourcachefs.
Related Issues (1)
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 sourcachefs.