Source File
dict.go
Belonging Package
github.com/google/licensecheck/internal/match
package match
import (
)
if := htmlEntitySize(); > 0 {
if [:] == "©" {
= int32(len() - len())
= + int32()
= copyright
= [:]
goto
}
= [:]
continue
}
}
if len() >= 2 && [0] == ']' && [1] == '(' {
if := markdownLinkSize(); > 0 {
= [:]
continue
}
}
, := utf8.DecodeRuneInString()
if !isWordStart() {
= [:]
continue
}
= appendFoldRune([:0], )
= int32(len() - len())
if != '©' {
for < len() {
, := utf8.DecodeRuneInString([:])
if !isWordContinue() {
break
}
+=
= appendFoldRune(, )
}
switch {
for {
:= unicode.SimpleFold()
if >= {
break
}
=
}
switch {
case 'Á', 'À':
return 'a'
case 'É', 'È':
return 'e'
case 'Í', 'Ì':
return 'i'
case 'Ó', 'Ò':
return 'o'
case 'Ú', 'Ù':
return 'u'
}
if 'A' <= && <= 'Z' {
+= 'a' - 'A'
}
return -1
}
return
}
func ( string) string {
var []byte
for , := range {
= appendFoldRune(, )
}
return string()
}
if ! {
return 0
}
func ( string) int {
if len() < 2 || [0] != ']' || [1] != '(' {
return 0
}
:= false
for , := range markdownLinkPrefixes {
if strings.HasPrefix([2:], ) {
= true
break
}
}
if ! {
return 0
}
for := 2; < len(); ++ {
:= []
if == ' ' || == '\t' || == '\r' || == '\n' {
return 0
}
if == ')' {
return + 1
}
}
return 0
}
var canonicalRewrites = []struct {
x, y string
}{
{"is", "are"},
{"it", "them"},
{"it", "they"},
{"the", "these"},
{"the", "this"},
{"the", "those"},
{"copy", "copies"}, // most plurals are handled as 1-letter typos
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |