You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Indirect returns the value that v points to.
// If v is a nil pointer, Indirect returns a zero Value.
// If v is not a pointer, Indirect returns v.
// Deprecated: use Value.Indirect
func Indirect(v Value) Value {
if v.Kind() != Pointer {
return v
}
return v.Elem()
}
// Indirect returns the value that v points to.
// If v is a nil pointer, Indirect returns a zero Value.
// If v is not a pointer, Indirect returns v.
func (v Value) Indirect() Value {
if v.Kind() != Pointer {
return v
}
return v.Elem()
}
“Indirect()” have a similar function to “Elem()”,
Unified invocation mode is recommended
The text was updated successfully, but these errors were encountered:
“Indirect()” have a similar function to “Elem()”,
Unified invocation mode is recommended
The text was updated successfully, but these errors were encountered: