Change-Id: Ie1e76d2e99bf2af7f064c9073c1fb866086962f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/436715
Run-TryBot: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <
523516579@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
 
                        return nil, false
                }
        }
-       if strings.HasPrefix(text, "*") {
-               text = text[1:]
-       }
+       text = strings.TrimPrefix(text, "*")
        pkg, name, ok := splitDocName(text)
        var recv string
        if ok {