You may set v directly here, with reflect.Append(field, v). Then the two lines above are not needed.