为了账号安全,请及时绑定邮箱和手机立即绑定

编译错误,求助

.\app.go:43:35: cannot use StatusError literal (type StatusError) as type error in argument to respondWrithError:

StatusError does not implement error (Error method has pointer receiver)

.\app.go:48:35: cannot use StatusError literal (type StatusError) as type error in argument to respondWrithError:

StatusError does not implement error (Error method has pointer receiver)


正在回答

2 回答

StatusError 方法需要一个指针的receiver ?   方法定义的时候返回值看下

0 回复 有任何疑惑可以回复我~

错误说明说的很清楚了的嘛,  如果要用StatusError 就必须要实现error方法才行

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

编译错误,求助

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号