I need to differentiate such types as
type A []byte
from a []byte
. Using reflect
, reflect.TypeOf(A{}).Kind
tells me that it is a Slice
of byte
. How can I differentiate []byte{}
from A{}
, without having a bounded list of types to check for?
Are there new ways to do it in newer versions of Go?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…