if wt, ok := src.(WriterTo); ok {
return wt.WriteTo(dst)
}
This is a source code snippet taken from the go standard package to determine whether a type (object) has a specified method.
if wt, ok := src.(WriterTo); ok {
return wt.WriteTo(dst)
}
This is a source code snippet taken from the go standard package to determine whether a type (object) has a specified method.