Comments (12)
reference to gorm database package that is
from negroni.
Please use stack overflow for this, github issues should be for bug reports only.
from negroni.
Technically not true. There is a Label for questions. And in many git repositories, questions - if not encouraged, - are legitimately tolerated. With people responding just like in stack overflow.
from negroni.
@pjebs You should create the database handler once and inject it into the middleware as well as the HTTP handler.
from negroni.
@pjebs See http://play.golang.org/p/ztSXdQy5Uj for an example.
from negroni.
I looked at your code. It seems to apply the middleware to all end points. Is there a way to selectively apply the middleware to only some end points?
from negroni.
from negroni.
@jszwedko do you think this is good for he purpose: http://www.gorillatoolkit.org/pkg/context
from negroni.
that is exactly what i use when working with negroni. at the moment i think negroni only allows you to use this sort of universal context as not to break away from the standard http.HandlerFunc.
this article helped me a lot to think about contexts, hope it helps you!
http://elithrar.github.io/article/map-string-interface/
—
Peter K Lucak
Sent from my mobile device.
On Wed, Oct 22, 2014 at 11:19 AM, pjebs [email protected] wrote:
@jszwedko do you think this is good for he purpose: http://www.gorillatoolkit.org/pkg/context
Reply to this email directly or view it on GitHub:
#43 (comment)
from negroni.
I'm playing with some fun ideas having to do with contexts and the go generate
command. It's still too premature but maybe sometime soon I will share it with people. It looks like it may be a really cool pattern to use with negroni.
from negroni.
I will update you guys with some techniques I use with Gorilla Context soon. Closing this issue for now
from negroni.
Any updates on this, codegangsta? :)
from negroni.
Related Issues (20)
- New version tag HOT 2
- PANIC: interface conversion: *negroni.responseWriter is not negroni.ResponseWriter: missing method Before
- more example on PanicHandlerFunc ? HOT 4
- Paths containing percent (%) character not being logged correctly HOT 1
- negroni not working with google appengine HOT 2
- Gocritic 3.3 warning ifElseChain
- http.CloseNotifier is deprecated HOT 1
- http.CloseNotifier has deprecated
- Multiple With() + many middleware handlers problem HOT 3
- Can't set response headers when implementing custom Recovery Formatter HOT 3
- Can't prevent panic text from being sent on the wire
- PANIC: runtime error: invalid memory address or nil pointer dereference HOT 2
- Recovery middleware not setting stack in PanicInformation HOT 2
- The master branch is not 1.0.0 HOT 1
- Negroni and new relic HOT 2
- Change Logger Output
- negroni.ResponseWriter implements http.Flusher even if underlying http.ResponseWriter doesn't HOT 2
- bug: recovery middleware has a bug
- v3 `ResponseWriter.Before()` functions can't overwrite HTTP response code
- Release the latest tag HOT 17
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 negroni.