golang / gddo

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

Mention Gitea, and generic git, mecurial, bzr support #578

Open coolaj86 opened 6 years ago

coolaj86 commented 6 years ago

As I understand it, the docs just work by git (or mercurial or bzr) and are not tied to specific platforms.

However, the docs on the website are unclear about this:

GoDoc hosts documentation for Go packages on Bitbucket, GitHub, Google Project Hosting and Launchpad.

Being new to the Go community and trying to understand how things work, I was confused by this at first.

I'd suggest updating the copy to read something more similar to this:

GoDoc hosts documentation for Go packages using git, mercurial, and bzr import URLs.

This works with popular hosting sites such as Bitbucket, GitHub, Google Project Hosting and Launchpad, as well as peer platforms such as GitLab and Gitea.

Related to https://github.com/golang/gddo/issues/538

Bios-Marcel commented 5 years ago

I wonder ... does it support any git provider site? For example I am using https://git.sr.ht , however it can't seem to find this https://godoc.org/?q=git.sr.ht%2F%7Ebiosmarcel%2Fanimaid%2Fanimaid

refacto commented 5 years ago

Struggling with the same issue, but with my own go get-able site that godoc.org doesn't recognize. The import path is import "go.azarus.ch/fuelconv"

urandom2 commented 5 years ago

Looks like the pattern in the gddo/gosrc.service for generic VCS is insufficient. The regexp is pretty strict and only allows A-Za-z0-9_.\-/, but the spec allows for most unicode characters except !"#$%&'()*,:;<=>?[\]^`{|}.

That being said, the two examples you gave are for git.sr.ht and hg.sr.ht, both of which suffer from go-get issues and fail for other reasons:

Do you have an example git.sr.ht repo that I can test with that contains go code at the root? (e.g. git.sr.ht/~user/pkg)

Bios-Marcel commented 5 years ago

Here: https://git.sr.ht/~biosmarcel/animaid or https://git.sr.ht/~biosmarcel/go-webclock (this actually has no exported symbols, probably useless)

refacto commented 5 years ago

Hi Colin,

Here's an hg repo: https://hg.sr.ht/~azarus/fuelconv

I'll mirror it under https://git.sr.ht/~azarus/gfuelconv in a minute.

urandom2 commented 5 years ago

yeah, adding the tilde char will unblock these go get-able repos:

https://go-review.googlesource.com/c/gddo/+/168065 image

I think there is a larger discussion to be had about the long term fix, since this regexp does not follow the spec, but that is for the repo maintainers.

dncohen commented 5 years ago

If gddo is going to run a command like git or svn to fetch the source code, wouldn't it be simpler to just run go get?