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: cannot read "\n" using a rune or byte #12537

Closed
quark-zju opened this issue Sep 8, 2015 · 2 comments
Closed

fmt: cannot read "\n" using a rune or byte #12537

quark-zju opened this issue Sep 8, 2015 · 2 comments

Comments

@quark-zju
Copy link

@quark-zju quark-zju commented Sep 8, 2015

It was okay in previous Go versions.

package main

import "fmt"

func main() {
    var c rune
    n, e := fmt.Sscanf("\n", "%c", &c)
    fmt.Println(n, e)
    // Go 1.5: 0 unexpected newline
    // Go 1.2, 1.3, 1.4: 1 <nil>
}
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Sep 8, 2015

/cc @robpike

@robpike
Copy link
Contributor

@robpike robpike commented Sep 8, 2015

This is fixed at tip. Duplicate of #12275

@robpike robpike closed this Sep 8, 2015
@golang golang locked and limited conversation to collaborators Sep 8, 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.