It looks like the links used on pkg.go.dev (Golang package documentation companion) that refer to packages on codeberg.org are broken.
They use links with abbreviated git commit hashes and gitea seems to 404 those instead of redirecting them to the long notation.
Example: https://pkg.go.dev/codeberg.org/ac/ecdh25519
If you click on any link on this page that refers to a specific file on codeberg.org, then the links resolves to a 404.
Let's go into detail:
Go to https://pkg.go.dev/codeberg.org/ac/ecdh25519#section-sourcefiles and take a look at the link for the file ecdh25519.go.
It refers to ac/ecdh25519@8a2cf2a5c9/ecdh25519.go
If you call that link, you'll receive a 404:
$ curl -I https://codeberg.org/ac/ecdh25519/src/commit/8a2cf2a5c93c/ecdh25519.go
HTTP/2 404
...
The correct permalink is however:
ac/ecdh25519@8a2cf2a5c9/ecdh25519.go
Workaround:
Either redirect the short form to the long form or provide an alternative src/commit/{short}/sourcefile as an alternative path.
I also opened an issue at the go community. https://github.com/golang/go/issues/44865
It looks like the links used on pkg.go.dev (Golang package documentation companion) that refer to packages on codeberg.org are broken.
They use links with abbreviated git commit hashes and gitea seems to 404 those instead of redirecting them to the long notation.
Example: https://pkg.go.dev/codeberg.org/ac/ecdh25519
If you click on any link on this page that refers to a specific file on codeberg.org, then the links resolves to a 404.
Let's go into detail:
Go to https://pkg.go.dev/codeberg.org/ac/ecdh25519#section-sourcefiles and take a look at the link for the file ecdh25519.go.
It refers to https://codeberg.org/ac/ecdh25519/src/commit/8a2cf2a5c93c/ecdh25519.go
If you call that link, you'll receive a 404:
```
$ curl -I https://codeberg.org/ac/ecdh25519/src/commit/8a2cf2a5c93c/ecdh25519.go
HTTP/2 404
...
```
The correct permalink is however:
> https://codeberg.org/ac/ecdh25519/src/commit/8a2cf2a5c93c3fb69f0e6161f4bb82dcc3584b0/ecdh25519.go
Workaround:
Either redirect the short form to the long form or provide an alternative src/commit/{short}/sourcefile as an alternative path.
I also opened an issue at the go community. https://github.com/golang/go/issues/44865