I was wondering if it was possible to show multiple versions of a package.
I'm looking to set up an internal package docs service for our company. Our users may be developing using different versions of a package. It would be nice to be able to show docs for multiple versions of a package. We manage versions in the common idomatic manner of using git tags of format "v0.0.1" etc.
I realize that showing all versions would be difficult as you'd have to be git aware and loop through all history of git tags in a package dir that's been identified as a git repo.
Maybe some opinionation of how someone could host multiple versions of a package would be nice. That way we could package up the versions of a package as artifacts and export to a standard format that the GUI is aware of. E.g., if golds is serving a directory of packages and it sees the following contents:
mypackage_v0.0.1_
mypackage_v0.0.2_
otherpackage_v0.3.4_
The GUI knows to strip the underscores and parse the version and inject into the GUI somehow. Obviously pkg.go.dev is version aware so you could easily generate the links to the specific versions.
Package mypackage (v0.0.1)
Import Path
[github.com/myorg/mypackage](http://localhost:56789/#pkg-github.com/myorg/mypackage) (on [go.dev](https://pkg.go.dev/github.com/myorg/mypackage@v0.0.1))
...
Package mypackage (v0.0.2)
Import Path
[github.com/myorg/mypackage](http://localhost:56789/#pkg-github.com/myorg/mypackage) (on [go.dev](https://pkg.go.dev/github.com/myorg/mypackage@v0.0.2))
...
Package otherpackage (v0.3.4)
Import Path
[github.com/myorg/mypackage](http://localhost:56789/#pkg-github.com/myorg/otherpackage) (on [go.dev](https://pkg.go.dev/github.com/myorg/otherpackage@v0.3.4))
Just thinking of ways to do it without a ton of git work.
I was wondering if it was possible to show multiple versions of a package.
I'm looking to set up an internal package docs service for our company. Our users may be developing using different versions of a package. It would be nice to be able to show docs for multiple versions of a package. We manage versions in the common idomatic manner of using git tags of format "v0.0.1" etc.
I realize that showing all versions would be difficult as you'd have to be git aware and loop through all history of git tags in a package dir that's been identified as a git repo.
Maybe some opinionation of how someone could host multiple versions of a package would be nice. That way we could package up the versions of a package as artifacts and export to a standard format that the GUI is aware of. E.g., if golds is serving a directory of packages and it sees the following contents:
The GUI knows to strip the underscores and parse the version and inject into the GUI somehow. Obviously pkg.go.dev is version aware so you could easily generate the links to the specific versions.
Just thinking of ways to do it without a ton of git work.