зеркало из https://github.com/golang/pkgsite.git
internal/stdlib: clarify doc comment for Contains
Change-Id: Ic17226b2ae53e17ed96ee288e29306845252b3e8 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/747785 Reviewed-by: Julie Qiu <julieqiu@google.com>
This commit is contained in:
Родитель
c4fb18e370
Коммит
f648800004
|
@ -395,7 +395,8 @@ func subTree(r *git.Repository, t *object.Tree, name string) (*object.Tree, erro
|
|||
return nil, os.ErrNotExist
|
||||
}
|
||||
|
||||
// Contains reports whether the given import path is part of the Go standard library.
|
||||
// Contains reports whether the given import path could be part of the Go standard library,
|
||||
// by reporting whether the first component lacks a '.'.
|
||||
func Contains(path string) bool {
|
||||
if i := strings.IndexByte(path, '/'); i != -1 {
|
||||
path = path[:i]
|
||||
|
|
Загрузка…
Ссылка в новой задаче