tech: adds/removes in vendor folder according to dep 0.4.0.
This commit is contained in:
-23
@@ -1,23 +0,0 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
unidecode
|
||||
=========
|
||||
|
||||
Unicode transliterator in Golang - Replaces non-ASCII characters with their ASCII approximations.
|
||||
|
||||
[](https://godoc.org/github.com/rainycape/unidecode)
|
||||
-46731
File diff suppressed because it is too large
Load Diff
-57
@@ -1,57 +0,0 @@
|
||||
package unidecode
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func testTransliteration(original string, decoded string, t *testing.T) {
|
||||
if r := Unidecode(original); r != decoded {
|
||||
t.Errorf("Expected '%s', got '%s'\n", decoded, r)
|
||||
}
|
||||
}
|
||||
|
||||
func TestASCII(t *testing.T) {
|
||||
s := "ABCDEF"
|
||||
testTransliteration(s, s, t)
|
||||
}
|
||||
|
||||
func TestKnosos(t *testing.T) {
|
||||
o := "Κνωσός"
|
||||
d := "Knosos"
|
||||
testTransliteration(o, d, t)
|
||||
}
|
||||
|
||||
func TestBeiJing(t *testing.T) {
|
||||
o := "\u5317\u4EB0"
|
||||
d := "Bei Jing "
|
||||
testTransliteration(o, d, t)
|
||||
}
|
||||
|
||||
func TestEmoji(t *testing.T) {
|
||||
o := "Hey Luna t belle 😵😂"
|
||||
d := "Hey Luna t belle "
|
||||
testTransliteration(o, d, t)
|
||||
}
|
||||
|
||||
func BenchmarkUnidecode(b *testing.B) {
|
||||
cases := []string{
|
||||
"ABCDEF",
|
||||
"Κνωσός",
|
||||
"\u5317\u4EB0",
|
||||
}
|
||||
for ii := 0; ii < b.N; ii++ {
|
||||
for _, v := range cases {
|
||||
_ = Unidecode(v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkDecodeTable(b *testing.B) {
|
||||
for ii := 0; ii < b.N; ii++ {
|
||||
decodeTransliterations()
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
decodeTransliterations()
|
||||
}
|
||||
Reference in New Issue
Block a user