2026-05-05 How to get a package onto pkg.go.dev =============================================== I noticed that somebody (me?) had managed to get version 1.18.3 of Oddμ onto pkg.go.dev. But the current version was 1.22‽ What was going on? I started reading the section about version control systems in the Go Modules Reference. Whaaat. So complicated. Well, it's complicated if you have changed the package name in the past, that is, you changed the URLs. It's complicated if you self-host your bare git repositories. Ugh. So here is what I did: My post-update hook for repositories now checks if a go.mod file exists in the repository and if so, it adds a meta element like this one for oddmu: In order to trigger a refresh, I created an empty directory, initialized a new Go project using go mod init src.alexschroeder.ch/temp and installed my code: go get src.alexschroeder.ch/oddmu@v1.22.1 This didn't work immediately. For one, the ASN 15169 (Google) was blocked on my site because it hosts so many bots. I had to unban it. Perhaps switching from v1.22 to v1.22.1 (adding a third number) was important as well? I don't know. Then I repeated the entire thing for Xobaque. go get src.alexschroeder.ch/xobaque@v1.0.0 And it works: * https://pkg.go.dev/src.alexschroeder.ch/oddmu * https://pkg.go.dev/src.alexschroeder.ch/xobaque #Go #Oddμ #Xobaque