Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/scanner: incorrect handling of error returned from source #7594

Closed
rui314 opened this issue Mar 20, 2014 · 2 comments
Closed

text/scanner: incorrect handling of error returned from source #7594

rui314 opened this issue Mar 20, 2014 · 2 comments

Comments

@rui314
Copy link
Member

rui314 commented Mar 20, 2014

What does 'go version' print?
go version devel +2b85dda01af0 Wed Mar 19 10:14:04 2014 -0700 linux/amd64

text.scanner ignores an error returned from source if return values from source are (0,
<error>).

http://play.golang.org/p/V3A0NLBgSQ
@bradfitz
Copy link
Contributor

Comment 1:

Wow, this package is not even used once in the whole Go standard library + subrepos.
$ grep -r text/scanner $GOROOT/src $GOPATH/src/code.google.com | grep -v zstdlib.go
/Users/bradfitz/go/src/pkg/go/build/deps_test.go:   "text/scanner":        {"L4", "OS"},
/Users/bradfitz/src/code.google.com/p/go.net/html/testdata/go1.html:<tr><td>scanner</td>
<td>text/scanner</td></tr>
/Users/bradfitz/src/code.google.com/p/go.net/html/testdata/go1.html:<a
href="/pkg/text/scanner/"><code>text/scanner</code></a> package
should be used
/Users/bradfitz/src/code.google.com/p/go.tools/go/gccgoimporter/gccgoinstallation_test.go:  "text/scanner",
/Users/bradfitz/src/code.google.com/p/go.tools/go/gccgoimporter/parser.go:  "text/scanner"
/Users/bradfitz/src/code.google.com/p/go.tools/go/gccgoimporter/parser_test.go: "text/scanner"
/Users/bradfitz/src/code.google.com/p/go.tools/go/gcimporter/gcimporter.go: "text/scanner"
/Users/bradfitz/src/code.google.com/p/go.tools/go/ssa/interp/interp_test.go:    "text/scanner",
/Users/bradfitz/src/code.google.com/p/go.tools/go/types/testdata/shifts.src:    // from
src/pkg/text/scanner/scanner.go:540
/Users/bradfitz/src/code.google.com/p/go.tools/godoc/redirect/redirect.go:  "scanner":   
       "text/scanner",
We better fix this bug quickly.  :-)

Labels changed: added repo-main.

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 2:

This issue was closed by revision b89a9ff.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants