Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
fmt: Scanf's err puts extraneous '\n' if arg is small #13743
Scanf doesn't seem to care about newline in format. It's also putting an extraneous
With "golang" as input, the "olang" gets dragged to a newline in
"olang" isn't in err. What's happening is fmt.Scanf is reading one byte at a time, it reads the 'g' character, realizes that's not an integer character, then your Go program exits after printing
This seems to be working as intended.