diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-01-18 16:45:30 +0100 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-01-24 02:11:08 +0100 |
commit | ce354a6afbf1813c9a5565a00f6937c1b6fd1e42 (patch) | |
tree | 5f8fef7e2879a8aec6e8c22302c4fce5e46e7083 /vendor/golang.org/x/text/runes/example_test.go | |
parent | 56dd0f4dfdc33594502ec02421425c3432570be3 (diff) |
[pkg] remove vendoring of golang/x/*
I think there's no need of vendoring this.
The debian package builds fine without them - at least with the text-dev
package in testing.
Diffstat (limited to 'vendor/golang.org/x/text/runes/example_test.go')
-rw-r--r-- | vendor/golang.org/x/text/runes/example_test.go | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/vendor/golang.org/x/text/runes/example_test.go b/vendor/golang.org/x/text/runes/example_test.go deleted file mode 100644 index a60bfd9..0000000 --- a/vendor/golang.org/x/text/runes/example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package runes_test - -import ( - "fmt" - "unicode" - - "golang.org/x/text/runes" - "golang.org/x/text/transform" - "golang.org/x/text/unicode/norm" - "golang.org/x/text/width" -) - -func ExampleRemove() { - t := transform.Chain(norm.NFD, runes.Remove(runes.In(unicode.Mn)), norm.NFC) - s, _, _ := transform.String(t, "résumé") - fmt.Println(s) - - // Output: - // resume -} - -func ExampleMap() { - replaceHyphens := runes.Map(func(r rune) rune { - if unicode.Is(unicode.Hyphen, r) { - return '|' - } - return r - }) - s, _, _ := transform.String(replaceHyphens, "a-b‐c⸗d﹣e") - fmt.Println(s) - - // Output: - // a|b|c|d|e -} - -func ExampleIn() { - // Convert Latin characters to their canonical form, while keeping other - // width distinctions. - t := runes.If(runes.In(unicode.Latin), width.Fold, nil) - s, _, _ := transform.String(t, "アルアノリウ tech / アルアノリウ tech") - fmt.Println(s) - - // Output: - // アルアノリウ tech / アルアノリウ tech -} - -func ExampleIf() { - // Widen everything but ASCII. - isASCII := func(r rune) bool { return r <= unicode.MaxASCII } - t := runes.If(runes.Predicate(isASCII), nil, width.Widen) - s, _, _ := transform.String(t, "アルアノリウ tech / 中國 / 5₩") - fmt.Println(s) - - // Output: - // アルアノリウ tech / 中國 / 5₩ -} |