Initializing Struct ReferencesInitializing Struct ReferencesUse &T{} instead of new(T) when initializing struct references so that itis consistent with the struct initialization. BadGood sval := T{Name: "foo"} // inconsistentsptr := new(T)sptr.Name = "bar" sval := T{Name: "foo"} sptr := &T{Name: "bar"}