paulbellamy / mango Goto Github PK
View Code? Open in Web Editor NEWMango is a modular web-application framework for Go, inspired by Rack, and PEP333.
Home Page: http://github.com/paulbellamy/mango
License: MIT License
Mango is a modular web-application framework for Go, inspired by Rack, and PEP333.
Home Page: http://github.com/paulbellamy/mango
License: MIT License
It might be nice to have an Edge-Side Include processing middleware.
For more info on ESIs see: http://en.wikipedia.org/wiki/Edge_Side_Includes
Other Thoughts:
It would be awesome to support drop-in http-caching.
Other Thoughts:
I think this will be a great framework If you can provide some more like MVC, ORM. Do you have any plan?
Would be nice to have a basic-auth middleware. It should probably accept an 'authenticator' function that verifies a set of credentials? That way it could be very extensible.
I presume that these are issues related to newer versions of go:
tobi@i7 ~ $ goinstall github.com/paulbellamy/mango
vgoinstall: === cd /Users/tobi/local/cellar/go/r57.2/src/pkg/github.com/paulbellamy/mango; gomake -f- install
6g -o _go_.6 jsonp.go logger.go mango.go mime.go routing.go sessions.go show_errors.go static.go
sessions.go:52: not enough arguments in call to strings.Split
sessions.go:97: env.Request().Cookies undefined (type *Request has no field or method Cookies)
sessions.go:98: typechecking loop
sessions.go:113: cookie.String undefined (type *http.Cookie has no field or method String)
make: *** [_go_.6] Error 1
--- exit status 2
goinstall: installing github.com/paulbellamy/mango: running gomake: exit status 2
sessions.go:96: method env.Request().Request.Cookie is not an expression, must be called
sessions.go:97: typechecking loop
Symptom: Incorrect data is being served by mango.Static for binary files.
Possible cause: The mango.Body type is a string, so binary bytes are typecast to string in mango.Static.
Possible solution: Change mango.Body type to []byte
From the Readme:
env.Logger().Println("Got a", env.Request().Method, "request for", env.Request().RawURL)
Somewhere last year Request.RawURL was deprecated. See discussion and commit:
https://groups.google.com/forum/?fromgroups=#!topic/golang-nuts/t7YlEOJB0xg
http://code.google.com/p/go/source/detail?r=af3d7d10735c
Request().RequestURI
should do the trick.
I'm having errors compilings examples folder.
Makefile try to compile silence_middleware and cats_middleware as apps not as libraries.
It would be great to have an Etag / Cache-Control handling middleware.
It might be nice to have a "Test" middleware, where requests could be injected into the app stack, and the responses given extra information about what got called, etc...
Other Thoughts:
Would be nice if users could set the cookie expiry in the sessions middleware.
It would be nice to have a Lint module so that we could validate the environment, and response.
Other Thoughts:
It would be nice to have a Cross-Origin Resource Sharing, where the user could define a set of urls and permissions for them.
See here for more info on CORS: http://www.w3.org/TR/cors/
Or here: http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing
Please use HMAC instead of doing SHA1 over the concatenation of data and secret to avoid length-extension attacks. Although, the use of gob encoding makes them harder to implement, I think they are still possible.
Thank you!
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.