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
Essentially, I am asking for these three printfln lines of code to do the same thing:
mem_unit := 'K'
fmt.printfln("%ciB", mem_unit) // this is valid
fmt.printfln("{:c}iB", mem_unit) // this is valid
fmt.printfln("{c}iB", mem_unit) // this is invalid
I think the compiler should treat a format specifier with braces and without a colon the same as if there was a colon after the opening brace.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Essentially, I am asking for these three
printfln
lines of code to do the same thing:I think the compiler should treat a format specifier with braces and without a colon the same as if there was a colon after the opening brace.
Beta Was this translation helpful? Give feedback.
All reactions