I am new to golang. But I couldn't find an answer to this.
In python I can do,
array = [1, 2, 3, None, 5]
But in go when I write
var array = [5]int {1, 2, 3, nil, 5}
The compiler gives me the following error:
cannot convert nil to type int
How can I create an array in golang which is a mix of integer and nil values?