see that go get has the following behavior for vanity import paths:
For example,
import "example.org/pkg/foo"
will result in the following request(s):
https://example.org/pkg/foo?go-get=1 (preferred)
http://example.org/pkg/foo?go-get=1 (fallback)
If that page contains the meta tag
<meta name="go-import" content="example.org git
" rel="nofollow">https://code.org/r/p/exproj">
the go tool will verify that https://example.org/?go-get=1 contains the
same meta tag and then git clone https://code.org/r/p/exproj into
GOPATH/src/example.org.
will result in the following request(s):
https://example.org/pkg/foo?go-get=1 (preferred)
http://example.org/pkg/foo?go-get=1 (fallback)
If that page contains the meta tag
<meta name="go-import" content="example.org git
" rel="nofollow">https://code.org/r/p/exproj">
the go tool will verify that https://example.org/?go-get=1 contains the
same meta tag and then git clone https://code.org/r/p/exproj into
GOPATH/src/example.org.
First question, what is the *purpose* of doing a second query on the
example.org/ root?
Second, what does it mean "contains the *same* meta tag"? Should it
literally be byte for byte the same? How does the webserver know that it
should mention exproj in the meta tag when example.org/ is queried?
I think most of my confusion comes from trying this out on rsc.io/pdf
vanity import path:
~ $ curl http://rsc.io/pdf?go-get=1
<head>
<meta http-equiv="refresh" content="0; URL='http://godoc.org/rsc.io/pdf'">
<meta name="go-import" content="rsc.io/pdf git " rel="nofollow">https://github.com/rsc/pdf">
</head>
~ $ curl http://rsc.io/?go-get=1
<head>
<meta http-equiv="refresh" content="0; URL='http://godoc.org/rsc.io/'">
<meta name="go-import" content="rsc.io/ hg " rel="nofollow">https://code.google.com/p/rsc.">
</head>
The meta tag in the second query does not appear to be anywhere near the
same. Is that intended? If so, what is the logic, and if not, what should
the second query return instead?
Thank you.
P.S. Applying formatting in this post using this UI has been very painful
compared to doing the same using Markdown. :(
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.