You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We simply try reading with fmt.Sscanf (from the prepared string, but it is the same with fmt.Scanf reading from stdin - just more difficult to demonstrate) - there are two integer values, separated with windows-style newline (\r\n).
A newline is not a space, even without \r your line won't match.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
Go version
go1.23
Output of
go env
in your module/workspace:What did you do?
Here is an example in playground https://go.dev/play/p/z7Rd0o0PiJH
We simply try reading with
fmt.Sscanf
(from the prepared string, but it is the same withfmt.Scanf
reading from stdin - just more difficult to demonstrate) - there are two integer values, separated with windows-style newline (\r\n
).What did you see happen?
It prints
5 0
What did you expect to see?
It should print
5 8
C code for comparing behavior:
Also this is not in concordance with package description here https://pkg.go.dev/fmt
The text was updated successfully, but these errors were encountered: