These are chat archives for gin-gonic/gin

Aug 2015
Aug 13 2015 08:10
Hey, I'm kinda new to golang in general, anyone have an example of the best way to organize routes that represent resources? Like if I want to have two functions named index in different files, can I do that? and if so, how do I add an entire file's worth of funcs to the router, or does that not make sense in the context of golang?
Aug 13 2015 09:25
@itsjamie no Abort or AbortWithError will stop all other middlewares from being called: .
Jamie Stackhouse
Aug 13 2015 11:05

@ChristopherRabotin Right, however it doesn't stop the unraveling of middlewares that were executing before-hand. So in my handlers I often use it to respond with a status code.

If you are doing this inside a middleware, and want to send a status code, but continue to call additional middlewares that already haven't executed, you will probably need to run context.Writer.WriteHeader(code)

Aug 13 2015 11:35
Okay that's good to know.