Skip to content
Discussion options

You must be logged in to vote

I'm not sure how we could help the user to avoid panics here. In theory, this is something the user has to address:

if i < len(data) && j < len(data[i]) {
        // do something
} else {
        // do nothing, index would overflow
}

To improve, we might have to consider a whole different function signature to styleFunc, but then it'd be a breaking change.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bashbunni
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #487 on March 18, 2025 20:50.