diff options
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/doc/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/doc/main.go b/src/cmd/doc/main.go index b3be2a975b..18dafc298c 100644 --- a/src/cmd/doc/main.go +++ b/src/cmd/doc/main.go @@ -132,11 +132,12 @@ func parseArgs() (*build.Package, string, string) { // slash+1: if there's no slash, the value is -1 and start is 0; otherwise // start is the byte after the slash. for start := slash + 1; start < len(arg); start = period + 1 { - period = start + strings.Index(arg[start:], ".") + period = strings.Index(arg[start:], ".") symbol := "" if period < 0 { period = len(arg) } else { + period += start symbol = arg[period+1:] } // Have we identified a package already? |
