E2025 Syntax Errors
Syntax
expected integer for array size; the second value in [type, size] must be a positive integer
When this occurs
`[string, "5"]` instead of `[string, 5]`
Example error message
error[E2025]:
expected integer for array size, got STRING
How to fix
Array size must be a positive integer literal: `var arr [5]int` not `var arr [x]int`.
Related errors
No related errors.