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

tour: Clarify usage of any as an alias for interface{} in fmt.Print description #1668

Open
desabuh opened this issue Nov 17, 2024 · 0 comments

Comments

@desabuh
Copy link

desabuh commented Nov 17, 2024

Context: https://go.dev/tour/methods/14

In the Methods and Interfaces - Empty Interface section, the current text states:

For example, fmt.Print takes any number of arguments of type interface{}

While this statement is technically correct, the actual implementation of fmt.Print in Go uses any instead of interface{}. This could cause confusion for newcomers, as the example uses the older syntax while the implementation reflects the modern alias.

I think it'll be useful to update the text to clarify that any is an alias for interface{}, ensuring consistency with the source code state

@desabuh desabuh changed the title tour: [Clarify usage of any as an alias for interface{} in fmt.Print description] tour: Clarify usage of any as an alias for interface{} in fmt.Print description Nov 17, 2024
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

No branches or pull requests

1 participant