pppercyWang / iris-gorm-demo

iris+gorm+mysql的restful api项目起手式
95 stars 33 forks source link

运行报各种错,求帮助!,能否告知go版本! #3

Open plingply opened 4 years ago

plingply commented 4 years ago

iris-gorm/middleware

middleware/jwt.go:27:3: cannot use func literal (type func("github.com/kataras/iris/context".Context, string)) as type "github.com/iris-contrib/middleware/jwt".errorHandler in field value

tauruswei commented 4 years ago

go version 1.13 two steps below may resolve your question. 1、modify you code (middleware/jwt.go:27:3:) like: ErrorHandler: func(ctx context.Context, err error) 2、also,you need to import "github.com/kataras/iris/v12" rather than "github.com/kataras/iris" in your project

sunxueyi888 commented 4 years ago

确实很多错误,这两个解决了还有别的问题