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

Use %p to print &wallet.Balance in pointers-and-errors.md #616

Merged
merged 1 commit into from Oct 25, 2023

Conversation

1Mark
Copy link
Contributor

@1Mark 1Mark commented Oct 29, 2022

After the Stringer interface is implemented %v will no longer print the memory address but instead will invoke the Stringer interface which is confusing.

Using %p means it will consistently print the variable's memory address.

After the Stringer interface is implemented `%v` will no longer print the memory address but instead will invoke the Stringer interface which is confusing. 

Using `%p` means it will consistently print the variable's memory address.
@1Mark
Copy link
Contributor Author

1Mark commented Oct 29, 2022

later on in pointers-and-errors.md the Stringer interface is implemented hence the behaviour changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants