all: fix some staticcheck errors

Updates golang/go#35718

Change-Id: I10bfd5421cd44bb58b8bcaa6e9205040c25f51be
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208257
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/godoc/godoc.go b/godoc/godoc.go
index 810da32..6d4d115 100644
--- a/godoc/godoc.go
+++ b/godoc/godoc.go
@@ -312,9 +312,7 @@
 	//
 	// TODO: do this better, so it works for all
 	// comments, including unconventional ones.
-	if bytes.HasPrefix(line, commentPrefix) {
-		line = line[len(commentPrefix):]
-	}
+	line = bytes.TrimPrefix(line, commentPrefix)
 	id := scanIdentifier(line)
 	if len(id) == 0 {
 		// No leading identifier. Avoid map lookup for