packagemain import"fmt" funcmain(){ variinterface{}=12 switchv:=i.(type){ caseint: fmt.Println(v,"int类型") casestring: fmt.Println(v,"string类型") } }原文链接:https://www.f2er.com/go/190745.html
packagemain import"fmt" funcmain(){ variinterface{}=12 switchv:=i.(type){ caseint: fmt.Println(v,"int类型") casestring: fmt.Println(v,"string类型") } }原文链接:https://www.f2er.com/go/190745.html