From ee178bea371108feba8cc4e9c9dee7a66362d362 Mon Sep 17 00:00:00 2001 From: "David R. Jenni" Date: Wed, 1 Mar 2017 12:44:24 +0100 Subject: [PATCH] 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 --- godoc/godoc.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/godoc/godoc.go b/godoc/godoc.go index 13080de9f..e7868ee50 100644 --- a/godoc/godoc.go +++ b/godoc/godoc.go @@ -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)