These are chat archives for gin-gonic/gin

3rd
Apr 2017
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 18:36
hey guys
is this channel still active?
David Marchbanks
@ptdave20
Apr 03 2017 18:52
Yes. What's up?
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 18:59
Interesting. I am looking at various golang frameworks and my first choice was iris
but i have heard that i should avoid iris
Sebastian
@perelin
Apr 03 2017 19:08
Sup. So.. I try to get the raw body of a POST request for inspection/debugging. Tried to c.Bind() it to a struct as suggested here http://stackoverflow.com/questions/31911579/gin-golang-empty-req-body , but it just stays empty. Any suggestions what to try next?
Thomas Boerger
@tboerger
Apr 03 2017 19:14
@greta-burp-bonus good choice to avoid it
I wanted to use it as well but realized the crap early enough
@perelin there is some request dump functionality in the stdlib, that's what I used for that. If you provide a pr to have something easier within gin feel free to create a pr
Sebastian
@perelin
Apr 03 2017 19:20
@tboerger perfect! tried it and works. thx!
Thomas Boerger
@tboerger
Apr 03 2017 19:21
yw
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 19:25
So i think my choices come down to beego, revel, traffic and gin
i like the ORM by beego that abstracts away the database choice..
Sebastian
@perelin
Apr 03 2017 19:26
@greta-burp-bonus I found github.com/jinzhu/gorm to be a very nice ORM. Using it with gingonic.
Thomas Boerger
@tboerger
Apr 03 2017 19:27
Gin combined with xorm or gorm is good for me. Or maybe meddler if you need more performance
Since I'm working together on an oss project with the author of xorm I'm switching to xorm instead of gorm
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 19:29
@perelin oh wow that looks amazing. Thanks for that
whats the difference?
Thomas Boerger
@tboerger
Apr 03 2017 19:29
Xorm supports some additional databases
Otherwise the function definitions simply differ
But both are done by Chinese guys :D
Sebastian
@perelin
Apr 03 2017 19:31
ah, had no idea. interesting :)
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 19:33
I like GORM more
The docs are already much better
Sebastian
@perelin
Apr 03 2017 19:34
Thats whats also sold me on gorm to beginn with
very example driven
greta-burp-bonus
@greta-burp-bonus
Apr 03 2017 19:34
Yeah i love the docs. Ill stick with that.
So how is the performance like with gin?
is the router based on fasthttp (I heard that is like 10 times faster than net/http)
Sebastian
@perelin
Apr 03 2017 19:36
to be honest... I don´t expect as much traffic on my pet projects that any of that would make any difference ;) so... never checked
Thomas Boerger
@tboerger
Apr 03 2017 19:36
Avoid fasthttp. It doesn't work for http2 because of the used quirks :)
Or at least you should consider if it's really worth it, if you don't care about http2 it can work
But idk if it's possible with gin