diff options
Diffstat (limited to 'vendor/golang.org/x/text/internal/export/idna/example_test.go')
-rw-r--r-- | vendor/golang.org/x/text/internal/export/idna/example_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/golang.org/x/text/internal/export/idna/example_test.go b/vendor/golang.org/x/text/internal/export/idna/example_test.go index 6e31be97e..6e6b8727c 100644 --- a/vendor/golang.org/x/text/internal/export/idna/example_test.go +++ b/vendor/golang.org/x/text/internal/export/idna/example_test.go @@ -49,6 +49,10 @@ func ExampleNew() { idna.Transitional(true)) // Map ß -> ss fmt.Println(p.ToASCII("*.faß.com")) + // Lookup for registration. Also does not allow '*'. + p = idna.New(idna.ValidateForRegistration()) + fmt.Println(p.ToUnicode("*.faß.com")) + // Set up a profile maps for lookup, but allows wild cards. p = idna.New( idna.MapForLookup(), @@ -58,6 +62,7 @@ func ExampleNew() { // Output: // *.xn--fa-hia.com <nil> - // *.fass.com idna: disallowed rune U+002E + // *.fass.com idna: disallowed rune U+002A + // *.faß.com idna: disallowed rune U+002A // *.fass.com <nil> } |