- Use
x := []X_TYPE{}
when initializing an empty array - dont usex := make(X_TYPE, 0)
Think twice whenever you usex := make(X_TYPE, n)
forn>0
Note that you just added n empty items to the array. Think 10 times if you ever use/seex := make(X_TYPE, n)
followed byx = append (x, something)