Coder Social home page Coder Social logo

Comments (12)

pjebs avatar pjebs commented on May 23, 2024

reference to gorm database package that is

from negroni.

danielchatfield avatar danielchatfield commented on May 23, 2024

Please use stack overflow for this, github issues should be for bug reports only.

from negroni.

pjebs avatar pjebs commented on May 23, 2024

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.

jszwedko avatar jszwedko commented on May 23, 2024

@pjebs You should create the database handler once and inject it into the middleware as well as the HTTP handler.

from negroni.

jszwedko avatar jszwedko commented on May 23, 2024

@pjebs See http://play.golang.org/p/ztSXdQy5Uj for an example.

from negroni.

pjebs avatar pjebs commented on May 23, 2024

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.

 avatar commented on May 23, 2024

@pjebs See #25

from negroni.

pjebs avatar pjebs commented on May 23, 2024

@jszwedko do you think this is good for he purpose: http://www.gorillatoolkit.org/pkg/context

from negroni.

ptlu avatar ptlu commented on May 23, 2024

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.

codegangsta avatar codegangsta commented on May 23, 2024

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.

codegangsta avatar codegangsta commented on May 23, 2024

I will update you guys with some techniques I use with Gorilla Context soon. Closing this issue for now

from negroni.

antonholmquist avatar antonholmquist commented on May 23, 2024

Any updates on this, codegangsta? :)

from negroni.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.