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 the default high bound for a slice #1640

Open
justdigi opened this issue Aug 16, 2024 · 0 comments
Open

tour: Clarify the default high bound for a slice #1640

justdigi opened this issue Aug 16, 2024 · 0 comments

Comments

@justdigi
Copy link

justdigi commented Aug 16, 2024

Context: https://go.dev/tour/moretypes/10

When slicing, you may omit the high or low bounds to use their defaults instead.
The default is zero for the low bound and the length of the slice for the high bound.

Should "length of the slice for the high bound" be length of the array? At least in the example, the variable a is initialized as an array, not a slice.

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