Commit 5275a64a
has made this better. Directories are now determined by walking Go repositories at process start up.
What's left is to do it continuously while the process is running, rather than once at start up only.
Another place that can be made better is the list of release branches in initExistingDirectories
. It's currently hard-coded, but should be automated:
func initExistingDirectories() error {
// ...
for _, branch := range []string{"master", "release-branch.go1.12", "release-branch.go1.11"} {
// ...
Right now, the list of packages is computed at code writing time by using the
go list
command, and writing the result to a map in packages.go file.This has three problems:
It would be better to have this list of packages (directories, really) to be maintained dynamically.
This can be implemented by watching the relevant git repositories with source code for new commits to the master branch, and the release branches for the supported versions of Go (i.e., current and previous releases), and walking the tree to find all directories that exist.