]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/get: allow go get on github.com/ import paths with Unicode letters
authorDmitri Shuralyov <shurcooL@gmail.com>
Wed, 26 Apr 2017 23:07:15 +0000 (19:07 -0400)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 28 Apr 2017 15:32:18 +0000 (15:32 +0000)
commit65119318100915eb99bc726693951a982a3f130a
tree57461ad0f74b50b6fc6a488210a233472db5ecae
parenteb6adc27d56687970dd8a49794ca85acc4cf9097
cmd/go/internal/get: allow go get on github.com/ import paths with Unicode letters

More specifically, allow Unicode letters in the directories of GitHub
repositories, which can occur and don't have a valid reason to be
disallowed by go get.

Do so by using a predefined character class, the Unicode character
property class \p{L} that describes the Unicode characters that are
letters:

http://www.regular-expressions.info/unicode.html#category

Since it's not possible to create GitHub usernames or repositories
containing Unicode letters at this time, those parts of the import path
are still restricted to ASCII letters only.

Fix name of tested func in t.Errorf messages.

Fixes #18660.

Change-Id: Ia0ef4742bfd8317d989ef1eb1d7065e382852fe2
Reviewed-on: https://go-review.googlesource.com/41822
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/get/vcs.go
src/cmd/go/internal/get/vcs_test.go