Go to file
Jeff Carr bef6d6c911 realtime git clone. go.work paths work again 2024-11-15 09:11:11 -06:00
.gitignore look for and use any go.work file 2024-03-07 19:30:09 -06:00
LICENSE blerg 2024-03-07 00:50:58 -06:00
Makefile realtime git clone. go.work paths work again 2024-11-15 09:11:11 -06:00
README.md rename to 'argv'; use standard -ldflags 2024-11-07 07:03:51 -06:00
argv.go use go-cmd/cmd 2024-11-08 06:45:25 -06:00
control misc cleanups 2024-03-09 16:49:27 -06:00
main.go realtime git clone. go.work paths work again 2024-11-15 09:11:11 -06:00
readWorkFile.go git clone deps 2024-03-09 09:23:04 -06:00

README.md

go-clone

In 2018, gohack was written for the same reasons this tool was written. gohack has a good justification for this kind of tool.

Install go-glone

go install go.wit.com/apps/go-clone@latest

go-glone itself

This will make a work directory and download everything needs to compile go-clone.

go-clone go.wit.com/apps/go-clone

Or to recursively clone all the build dependancies:

go-clone --recursive go.wit.com/apps/go-clone

debian packages

Debian packages are at mirrors.wit.com

TODO:

  • use protobuf
  • move edge case mappings to a config file

Gohack: mutable checkouts of Go module dependencies

The new Go module system is awesome. It ensures repeatable, deterministic builds of Go code. External module code is cached locally in a read-only directory, which is great for reproducibility. But if you're used to the global mutable namespace that is $GOPATH, there's an obvious question: what if I'm hacking on my program and I want to change one of those external modules?

You might want to put a sneaky log.Printf statement to find out how some internal data structure works, or perhaps try out a bug fix to see if it solves your latest problem. But since all those external modules are in read-only directories, it's hard to change them. And you really don't want to change them anyway, because that will break the integrity checking that the Go tool does when building.

Luckily the modules system provides a way around this: you can add a replace statement to the go.mod file which substitutes the contents of a directory holding a module for the readonly cached copy. You can of course do this manually, but gohack aims to make this process pain-free.