зеркало из https://github.com/golang/tools.git
x/tools/godoc: remove unused functions
Found with honnef.co/go/tools/cmd/unused. Change-Id: I193ddd265673f133a489d268629b94be693a8dbc Reviewed-on: https://go-review.googlesource.com/37606 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Родитель
b20a216efb
Коммит
ee178bea37
|
@ -337,28 +337,6 @@ func isDigit(ch rune) bool {
|
|||
return '0' <= ch && ch <= '9' || ch >= utf8.RuneSelf && unicode.IsDigit(ch)
|
||||
}
|
||||
|
||||
// matchesIdentBoundary reports whether line matches /^ident\b/.
|
||||
// A boundary is considered either none, or an ASCII non-alphanum.
|
||||
func matchesIdentBoundary(line []byte, ident string) bool {
|
||||
if len(line) < len(ident) {
|
||||
return false
|
||||
}
|
||||
if string(line[:len(ident)]) != ident {
|
||||
return false
|
||||
}
|
||||
rest := line[len(ident):]
|
||||
return len(rest) == 0 || !isASCIIWordChar(rest[0])
|
||||
}
|
||||
|
||||
// isASCIIWordChar reports whether b is an ASCII "word"
|
||||
// character. (Matching /\w/ in ASCII mode)
|
||||
func isASCIIWordChar(b byte) bool {
|
||||
return 'a' <= b && b <= 'z' ||
|
||||
'A' <= b && b <= 'Z' ||
|
||||
'0' <= b && b <= '0' ||
|
||||
b == '_'
|
||||
}
|
||||
|
||||
func comment_htmlFunc(comment string) string {
|
||||
var buf bytes.Buffer
|
||||
// TODO(gri) Provide list of words (e.g. function parameters)
|
||||
|
|
Загрузка…
Ссылка в новой задаче