Hi, from reading http://tip.golang.org/cmd/go/#hdr-Remote_import_paths I
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

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
<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">
~ $ curl http://rsc.io/?go-get=1
<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.">

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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupgolang-nuts @
postedNov 28, '14 at 9:17p
activeNov 29, '14 at 1:41a

2 users in discussion

Dmitri Shuralyov: 2 posts Gary b: 1 post



site design / logo © 2023 Grokbase