This allows godoc.org to work on nested packages. As it stood gddo would
fail trying to find nested packages. Let's say we have a vaind with this
route:
go.mcquay.me/vain -> https://s.mcquay.me/sm/vain
Asking godoc for go.mcquay.me/vain would work fine. However trying to
get documentation for go.mcquay.me/vain/errors (nested package) would
return 404 since it wouldn't match known paths exactly.
Since now we match and return "go.mcquay.me/vain" for the full path,
gddo is able to use local caches for its information.
Change-Id: I599a75898493734fc652e507f477c11b1b1b13e8
I don't know if it's as meaningful to have verbose docs where when you
can just run the server and see the docs on the front page.
Change-Id: I9245044a95b5c0e100e14c718cdc99f560dfa3a5
the go tool currenty has a pathology where it mistakingly claims it
can't clone a repo because it checks prefix by bytes, not by splitting
the path on slash.
Once https://github.com/golang/go/issues/15947 comes out (go1.8) then go
tools will be able to handle being provided with valid but overlapping
packages.
For now though we'll just return meta for the requested package.
Change-Id: Ie5026e7d5c1377ff7d2c2140b21f9b745af69764
No longer do we keep track of const iota style. Just encode the behavior
in the server for defaults, add a validation function, call it a day.
Change-Id: I603e9dd287a57084c78c543f1ce83b0acf47a765
The original reason for having this required configuration parameter was that
I didn't think to read the hostname off the request. Doing it this way has the
additional benefit of a single server being able to serve a multitude of
hostnames.
Derek helped me realize this by repeating "there should be sane defaults" like
9000 times (maybe over 9000) till I got so tired of trying to make sure that he
understood why I did it that way to begin with that I looked at the problem
from a different perspective and like in a dream the solution came to me.
fixes#10.
I think I understand this now; the failure comes from here:
https://golang.org/src/cmd/go/vcs.go#L818
and makes it so one can't both host:
- github.com/foo
- github.com/foo/bar
which would have to clone the latter inside of the former.
Fixes#1.