IL
type some struct {
Name *string
}
есть ли какой-то инлайновый способ создать инстанс структуры с заполненным полем ?
типа..
mySome := &some{ name: “some” }
?Size: a a a
IL
mySome := &some{ name: “some” }
?MM
AP
AP
IL
Cannot take the address of '"hello"'
IL
// Bool is a helper routine that allocates a new bool value
// to store v and returns a pointer to it.
func Bool(v bool) *bool { return &v }
// Int is a helper routine that allocates a new int value
// to store v and returns a pointer to it.
func Int(v int) *int { return &v }
// Int64 is a helper routine that allocates a new int64 value
// to store v and returns a pointer to it.
func Int64(v int64) *int64 { return &v }
// String is a helper routine that allocates a new string value
// to store v and returns a pointer to it.
func String(v string) *string { return &v }
AP
ВС
ВС
IL
ВС
IL
AP
AP
AP
IL
AP
ЛА