-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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 %% not working #25954
Comments
Works for me on go1.10.3 darwin/amd64. Upgrade to latest? |
I just downloaded the latest mac version on the official go website |
Works for me as well. Please run this program to confirm you are using Go 1.10.1
|
@davecheney go1.10.1 |
Double checked it and it definitely produces incorrect output. |
I'm using |
@pjebs can you please provide a runnable code sample, play.golang.org is the best, that shows the complete program. It doesn't have to fail in the playground, but it must be the same program that does fail on your laptop. |
(I get the expected output both in 1.10.1 and 1.10.3, but on mac 10.13.3, which is different than the OP's. So maybe the difference is due to different OS version or we are not running the same code.) |
When I make a standalone program that is simply:
It works perfectly. But in my code inside my function it doesn't work. In fact even (inside my real-world code):
outputs:
|
I am afraid you will have to debug this on your own. If the standalone example is not reproducible, it is very hard for us to debug anything. Are you sure you are not redacting anything when pasting the code from the real world example ? Possibly, something in your code is adding an extra |
I'll close it because I agree it's hard for you to help. But my code is not doing anything else. It's very simple. |
I can confirm the bug is related to using fresh to hot reload my application: When I directly run my application uinsg |
This works on Go playground.
I have version: go version go1.10.1 darwin/amd64
It should output:
It actually outputs:
The text was updated successfully, but these errors were encountered: