关于如何在运行时确定对象类型的一些现有答案..god help us
if reflect.TypeOf(err) == string {
}那不编译
if reflect.TypeOf(err) == "string" {
}那个或这个都没有:
if reflect.TypeOf(err).Kind() == "string" {
}我们如何做到这一点?
如果我使用其中一个答案给出的 typeof 函数,我会得到:

米琪卡哇伊
慕勒3428872
MM们
随时随地看视频慕课网APP
相关分类