Comments (4)
When you run that gohack config
command, where is that setting stored?
Have you considered specifying the directory as part of the regular gohack some-module
command? For example, if it were configurable via an environment variable, one could ensure that the variable is exported whenever one enters that directory via one of those cd
magic wrappers.
An even crazier idea would be to piggyback off an existing file in a module. I can imagine a comment in go.mod
, but that would be a setting for everyone cloning the repository, and not just the one author.
from gohack.
When you run that gohack config command, where is that setting stored?
GOHACK/.config
?
Have you considered specifying the directory as part of the regular gohack some-module command?
That's quite a verbose option, yes. Almost akin to setting the environment variable as part of the command itself, e.g. GOHACK=$HOME/mywork gohack $module
. It requires me to specify the directory each time.
...via one of those cd magic wrappers.
I use such a magic wrapper, but not everyone does. This sort of thing feels like an additional bar.
An even crazier idea would be to piggyback off an existing file in a module. I can imagine a comment in go.mod, but that would be a setting for everyone cloning the repository, and not just the one author.
Yes, I think this is something that doesn't work... not least because this particular example is something that is global.
from gohack.
I can definitely see the motivation for this idea. I might be tempted to put the config file at $GOHACK/config.txt
because I don't see any particular reason for hiding it and it probably wants some kind of file extension.
Another possibility to consider is being able to specify a gohack location for a subtree. For example, I might want all modules under github.com/juju
to go into /home/rog/src/work
when gohacked.
from gohack.
I also think there is some scope for a module-local config that overrides the global well known "default". In many respects this would be similar to how a git
config setting at a branch level has higher precedence that its global equivalent.
from gohack.
Related Issues (20)
- getting permission denied error HOT 3
- implement undo -rm
- gohack get -vcs failed with incompatible pathspec HOT 1
- gohack does not allow relative directories in GOHACK env var. HOT 2
- Ran gohack get github.com/user/somerepo and it is missing the .git directory HOT 1
- bitbucket.org issues
- cannot undo if directory has been removed
- README: perhaps briefly explain how to work with a fork, including pushing a change to the fork?
- Use existing dependency code source from the GOPATH HOT 4
- Idea: flag for "fork" remote HOT 2
- proposal: add command to determine if commit is ancestor of module version
- add 'gohack promote' or 'gohack undo -get' HOT 2
- add 'gohack list' or shell completion support HOT 4
- accept package path in 'gohack get' HOT 2
- gohack redo
- gohack undo leaves trailing newlines HOT 3
- cannot get module info HOT 4
- Imply module name from $PWD HOT 5
- support linked file in gohack directory HOT 1
- supporting workspaces? HOT 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 gohack.