On Mon, Mar 11, 2019 at 8:35 PM T L <[email protected]> wrote:
>
> It says "the go tool will verify that https://example.org/?go-get=1 contains 
> the same meta tag ".
> Maybe I misunderstood it?

Oh, I see.  It doesn't double check that the top level domain has the
same meta tag.  It double checks that the import-prefix, the first
value in the go-import data, has the same meta tag.  In the example in
the doc that is example.org.  But for golang.org/x/text is itself
golang.org/x/text.  If you did "go get golang.org/x/text/unicode", it
would see a meta tag with golang.org/x/text as the import-prefix, and
it would double check that that import-prefix had the same meta tag.

Ian


> On Monday, March 11, 2019 at 7:50:43 PM UTC-4, Ian Lance Taylor wrote:
>>
>> On Mon, Mar 11, 2019 at 12:17 PM T L <[email protected]> wrote:
>> >
>> >  The page (https://golang.org/cmd/go/#hdr-Remote_import_paths) mentions
>> >
>> >> For example,
>> >>
>> >>     import "example.org/pkg/foo"
>> >>
>> >> will result in the following requests:
>> >>
>> >>     https://example.org/pkg/foo?go-get=1 (preferred)
>> >>     http://example.org/pkg/foo?go-get=1  (fallback, only with -insecure)
>> >>
>> >> If that page contains the meta tag
>> >>
>> >>     <meta name="go-import" content="example.org git 
>> >> 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.
>> >
>> >
>> > But I can't find the go-import meta in page "https://golang.org/?go-get=1";.
>> > The meta does exist in page "https://golang.org/x/text?go-get=1";.
>> > Doc mistake?
>> >
>> > $ curl -s  https://golang.org/x/text?go-get=1 | grep go-import
>> > <meta name="go-import" content="golang.org/x/text git 
>> > https://go.googlesource.com/text";>
>> > $
>> > $ curl -s  https://golang.org/?go-get=1 | grep go-import
>> > $
>>
>> The docs don't say that the meta tag should be on the top level domain
>> golang.org.  The docs say it should be on https://example.com/pkg/foo,
>> which for golang.org looks like https://golang.org/x/text.  So I don't
>> see a doc mistake here.
>>
>> Ian
>
> --
> 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.

-- 
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.

Reply via email to