Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-web这里的第五章里出现了一些疏忽 #58

Open
custs21113 opened this issue Jul 28, 2022 · 1 comment
Open

go-web这里的第五章里出现了一些疏忽 #58

custs21113 opened this issue Jul 28, 2022 · 1 comment

Comments

@custs21113
Copy link

https://geektutu.com/post/gee-day5.html
这里已经是day5-middleware的部分了,但是文章中的示例代码还是把代母所处的存放路径写成了day4-group。
希望能够更严谨些,纠正一下这个错误。

@custs21113
Copy link
Author

https://geektutu.com/post/gee-day5.html 这里已经是day5-middleware的部分了,但是文章中的示例代码还是把代母所处的存放路径写成了day4-group。 希望能够更严谨些,纠正一下这个错误。

然后还有一点是,在这个章节里没有出现下面这段关于Fail方法的代码。

func (c *Context) Fail(code int, err string) {
	c.index = len(c.handlers)
	c.JSON(code, H{"message": err})
}

但是在底下使用Demo的部分却调用了Fail方法,可能也需要在文章中增加这段代码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant