golang调试显示的信息很少,这可怎么debug?比如下面编译报错:
[root@vagrant-dev web]# go run main.gopanic: invalid sql type (slice) for mysql goroutine 1 [running]: github.com/jinzhu/gorm.(*mysql).DataTypeOf(0xc00000c440, 0xc00031e690, 0x9, 0x9a9258) /var/www/go_work/src/github.com/jinzhu/gorm/dialect_mysql.go:121 +0xd03github.com/jinzhu/gorm.(*Scope).createTable(0xc0002fe500, 0x9aab38) /var/www/go_work/src/github.com/jinzhu/gorm/scope.go:1156 +0x288github.com/jinzhu/gorm.(*Scope).autoMigrate(0xc0002fe500, 0x93da60) /var/www/go_work/src/github.com/jinzhu/gorm/scope.go:1252 +0x3cfgithub.com/jinzhu/gorm.(*DB).AutoMigrate(0xc00028ab00, 0xc0001c5f58, 0x1, 0x1, 0xc0003020b0) /var/www/go_work/src/github.com/jinzhu/gorm/main.go:596 +0x88main.main() /var/www/go_work/src/apiserver/cmd/web/main.go:27 +0x172exit status 2
只说了一句无效的sql style,在什么地方呢?要用什么调试工具才好呢?
蝴蝶不菲
相关分类