type A { B,C int } c := make([]*A,10) init(c) func init(c []*A){ for i :=0 i<len(c);i++ c[i] = &A{B:2} }