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

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 commented Sep 8, 2015

/cc @robpike

@robpike
Copy link
Contributor

robpike commented Sep 8, 2015

This is fixed at tip. Duplicate of #12275

@robpike robpike closed this as completed 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
Development

No branches or pull requests

4 participants