gitbookAugust 23, 2022 · One min readScottBMK使用gitbook的时候需要降低nodejs的版本gitbook支持的node版本v10.22.0: https://nodejs.org/download/release/v10.22.0/ , 版本太高会报各种错误
变量类型检测--gin拿到的都是stringAugust 23, 2022 · One min readScottBMK检测方法package mainimport ( "fmt" "reflect")type B struct {}func main() { a := "123" fmt.Println(reflect.TypeOf(a)) //string var b B fmt.Println(reflect.TypeOf(b)) //main.B}为什么要检测变量类型?1,前端传过来的数据,比如说bool,int你不知道会被转化成什么类型2,使用别人的库,你也不知道实例是什么类型用postman发送请求终端打印结果总结前端传来的数据,到了gin的手里全是string