Comments (2)
At a bare minimum, I think this would double the number the number of signatures that gocraft/web has to deal with for middleware. Also, how do you propose handling the fact that the context type of the middleware in a subrouter can be an extension(via embedding) of the context above it? This may not be as problematic as I suspect.
Also, why do you think contexts are automatically thread-safe? Copying an object in Go does not automatically create something thread-safe. For example, go create a copy of a big.Int
. You'll find that changes to the copy can affect the original.
from web.
@ohler I don't think I'm interested in supporting immutable contexts or go.net/context. They're both fine ideas, but incompatible with the design of gocraft/web.
from web.
Related Issues (20)
- sample project that glues web, dbr and health? HOT 1
- Comment for OptionsHandler is wrong (copy-paste error) HOT 1
- The router setup is not race safe
- subrouter middleware chaining HOT 1
- go vet warnings
- websocket support HOT 2
- Is gocraft/web compatible with standard http.Handlers? HOT 1
- Tag Versions?
- context with request and response
- Multiple domains and subdomains HOT 2
- proposal: sitemap.xml generator
- fasthttp support
- Subrouter middleware does not get called if no valid route requested HOT 1
- File upload not working HOT 1
- Impossible to get value of query params HOT 1
- Function Signatures
- Header change not honored after middleware set it
- Can you replace a route?
- Can you make public accessor to pathPrefix of a Router?
- url with trailing slash match route Get("/test/:uid" should be 404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.