Commit 824d8c10 authored by Wisdom Omuya's avatar Wisdom Omuya Committed by Brad Fitzpatrick

cmd/go: fix typo in findInternal documentation

Fixes #15217

Change-Id: Ib8f7af714197fd209e743f61f28a5b07c04a7f5c
Reviewed-on: https://go-review.googlesource.com/21793Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 3598d4b8
...@@ -523,7 +523,7 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package { ...@@ -523,7 +523,7 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package {
return p return p
} }
// Check for "internal" element: four cases depending on begin of string and/or end of string. // Check for "internal" element: three cases depending on begin of string and/or end of string.
i, ok := findInternal(p.ImportPath) i, ok := findInternal(p.ImportPath)
if !ok { if !ok {
return p return p
...@@ -560,7 +560,7 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package { ...@@ -560,7 +560,7 @@ func disallowInternal(srcDir string, p *Package, stk *importStack) *Package {
// If there isn't one, findInternal returns ok=false. // If there isn't one, findInternal returns ok=false.
// Otherwise, findInternal returns ok=true and the index of the "internal". // Otherwise, findInternal returns ok=true and the index of the "internal".
func findInternal(path string) (index int, ok bool) { func findInternal(path string) (index int, ok bool) {
// Four cases, depending on internal at start/end of string or not. // Three cases, depending on internal at start/end of string or not.
// The order matters: we must return the index of the final element, // The order matters: we must return the index of the final element,
// because the final one produces the most restrictive requirement // because the final one produces the most restrictive requirement
// on the importer. // on the importer.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment