← Back Home

Two Dimensional Slice in Go

Create a 2-dimensional boolean slice and initialize it in go.

isSomething := make([][]bool, length)
for i := range isSomething {
	isSomething[i] = make([]bool, length)
}