golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

gosrc: sourcehut support #612

Open eliasnaur opened 5 years ago

eliasnaur commented 5 years ago

In particular, I would like "View Source" links to appear on https://godoc.org/gioui.org/ui. gioui.org/ui is a vanity URL for https://git.sr.ht/~eliasnaur/gio/ui.

urandom2 commented 5 years ago

To get source links for aliases we will need a new urlTemplate entry in vcsCommand, like googlesource.

If there is interest in using the API, instead of the fallback fetch via git or hg, that will require a new service, like github, bitbucket, etc. This is helpful for fetching large or old repos, as they can timeout and create a weird ux. Unfortunately this optimization will only work for non-aliases, see #611.