golang / gddo

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

Support for vgo aware import paths #558

Closed myitcv closed 6 years ago

myitcv commented 6 years ago

Edit: retitled to reflect what I'm trying to achieve here, namely minimal support within gddo for vgo-aware import paths.

Is godoc.org running 1.10.3?

Per https://golang.org/doc/devel/release.html#go1.10.minor, 1.10.3 includes minimal support to the go command for the vgo transition. As such it will be essential to correctly resolve any projects/repos that convert to Go modules before the release of Go 1.11.

I ask because the following fails to resolve: https://godoc.org/?q=myitcv.io%2Fblah2

Despite the <meta> tags being apparently correct:

$ curl https://myitcv.io/blah2?go-get=1

<!DOCTYPE html>
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="go-import" content="myitcv.io git https://github.com/myitcv/x">
        <meta name="go-import" content="myitcv.io/blah2 mod https://raw.githubusercontent.com/myitcv/pubx/master">
        <meta name="go-source" content="myitcv.io https://github.com/myitcv/x/wiki https://github.com/myitcv/x/tree/master{/dir} https://github.com/myitcv/x/blob/master{/dir}/{file}#L{line}">
        <meta http-equiv="refresh" content="0; url=https://godoc.org/myitcv.io/blah2">
</head>
<body>
Redirecting to docs at <a href="https://godoc.org/myitcv.io/blah2">godoc.org/myitcv.io/blah2</a>...
</body>
</html>

Thanks

ghost commented 6 years ago

Upgrade to 1.10.3 will probably not help with the actual issue because the service does not use go get.

myitcv commented 6 years ago

I've mailed https://go-review.googlesource.com/c/gddo/+/120817 to fix this; would appreciate if someone could please take a look. Thanks

myitcv commented 6 years ago

@shantuo thanks for merging the CL. Is there anything we now need to do to redeploy?

shantuo commented 6 years ago

@myitcv I'll do a redeploy shortly, will report back then.

shantuo commented 6 years ago

The change is live now, thanks for the fix!

myitcv commented 6 years ago

Great, thanks. https://godoc.org/myitcv.io/blah2 now resolves properly