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

fmt: inconsistent behaviour of Scanf & Fscanf #10864

Closed
syst3mw0rm opened this issue May 15, 2015 · 1 comment
Closed

fmt: inconsistent behaviour of Scanf & Fscanf #10864

syst3mw0rm opened this issue May 15, 2015 · 1 comment
Assignees
Milestone

Comments

@syst3mw0rm
Copy link
Contributor

@syst3mw0rm syst3mw0rm commented May 15, 2015

Following program using Fscanf panics,

http://play.golang.org/p/0vdaUh2hJp

panic: unexpected newline

goroutine 1 [running]:
main.main()
    /tmp/sandbox/1.go:19 +0x3af
exit status 2

Another similar program using Scanf seems to work fine,

http://play.golang.org/p/rrBjFXuC0a

$ go run 2.go < input

$ hexdump input
0000000 31 0a 32 0a                                    
0000004

on commit 335e44d

Am I doing something terribly wrong or there is a legit bug? I've also file one relevant bug - #10853

@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone May 15, 2015
@robpike
Copy link
Contributor

@robpike robpike commented Jun 5, 2015

Duplicate of #9459

@robpike robpike closed this Jun 5, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.