mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
go/doc: use strings.TrimPrefix
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>
This commit is contained in:
parent
9910f8a403
commit
7aa4905bb4
|
@ -851,9 +851,7 @@ func (d *parseDoc) docLink(text, before, after string) (link *DocLink, ok bool)
|
|||
return nil, false
|
||||
}
|
||||
}
|
||||
if strings.HasPrefix(text, "*") {
|
||||
text = text[1:]
|
||||
}
|
||||
text = strings.TrimPrefix(text, "*")
|
||||
pkg, name, ok := splitDocName(text)
|
||||
var recv string
|
||||
if ok {
|
||||
|
|
Loading…
Reference in a new issue