go-macaron / docs Goto Github PK
View Code? Open in Web Editor NEWAn open source project for Macaron documentation.
Home Page: https://go-macaron.com
License: Apache License 2.0
An open source project for Macaron documentation.
Home Page: https://go-macaron.com
License: Apache License 2.0
Hi,
I have a question regarding regular expressions in your Framework:
If I have a route like this
m.Get("/user/:id([0-9]+)", func(ctx *macaron.Context) string { return fmt.Sprintf("User ID: %s", ctx.Params(":id")) })
and I enter a URL like http://localhost:4000/user/a12b3c, shouldn't it give me a 404? Instead it is returning "User ID: 12". Or is it intended to work this way?
谢了先。
When the Etag for static files is generated it is sent without quotes, so later the validation is not done correctly:
Response headers:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 104006
Content-Type: text/css; charset=utf-8
Etag: 8JmZhmJvb3RzdHJhcC5taW4uY3NzTW9uLCAyNyBBcHIgMjAyMCAxNTowMDowNiBHTVQ=
Last-Modified: Mon, 27 Apr 2020 15:00:06 GMT
As described in RFC 7232, the Etag must be in quotes:
怎么得到请求的所有get参数和post参数,以及所有的header?
Translation for pt-BR (Português Brasil)
https://github.com/renatosuero/macaron-docs/tree/master/pt-BR
https://github.com/jniltinho/macaron-docs/tree/master/pt-BR
Pull request on Friday
定义一个 router
结构如下
router.Group("/father", func() {
router.Get("/", controller.RenderChildrenList)
router.Get("/info/:child_id", controller.RenderChildInfo)
})
访问 father/info/111 结果404???
文档错误有不少,代码有些跑起来会报错,就算在源码打log也不清楚问题处在哪里了,对初学者不友好,还是希望写完文档自己测试一下吧。还是比较看好这个项目的。
目前没有用的特别深入,好象没有看到看到模板继承方面的内容,这样对于一些公共模块在每一个模板中都需要进行维护,不知道 go-macaron 是不支持模板继承亦或是我没看到呢?
谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.