Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.
Paul Jolly edited this page Oct 21, 2018 · 17 revisions

Guides to write

  • "How do I structure a mono-repo? Do I have just one go.mod at the root? How do I decide where to place a go.mod?"
  • A guide on how Hugo migrated from dep to vgo - perhaps ask @bep to help finesse this one?
  • "How do I use custom import paths with go modules?"
  • Using internal packages with modules
  • How to use go get X@branch
  • How and when to use a proxy via GOPROXY (including a proxy to the local file system as well as Athens)
  • Using go run (with the new package argument, when supported), particularly with module versions >= 2
  • Using goget (when it is available)
  • "How do I work with forks?"
  • "My git repo has a number of packages within it (but it's not a classic mono-repo). How do I decide which packages should be separate modules? What are the pros and cons of having a single top-level module vs more modules?"
  • "How can I grep all of myapp's dependencies?" (reuse part of this answer)
  • Explain direct vs indirect module dependencies
  • Example that depends on both v1 and v2 of a module
  • Working with complicated dependencies that are not yet modules, e.g. k8s. https://github.com/golang/go/issues/27457#issuecomment-419364867 as of https://github.com/prometheus/prometheus/commit/068eaa5dbfce6c08f3d05d3d3c0bfd96267cfed2
  • How to use go list for packages/modules; i.e. to list test dependencies
    • Why ./... ignores submodules
    • Include go list -m
  • Using go mod
    • go mod edit and its various flags, instead of creating file by hand
    • go mod why
    • Visualising dependencies using go mod graph and dot
  • Options for how to structure your repo when making breaking changes
  • Using 'golang.org/x/tools/cmd/digraph' to analyse dependencies

TODO

  • Automate the building of a table of contents in this README
  • Implement some sort of hash-bashed caching of README.md + script.sh + egrunner + mdreplace + vgo version + ...
Clone this wiki locally