Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681453y🤔 I haven't used it in a production environment. Works ok for small APis though.
@AleCx04 have you used gin? -
Gin is fine imo, using it for our microservice cloud and it'd pretty neat. There are many libraries to integrate with such as prometheus metrics, swagger ui and logging
-
hjk10157313yAt least familiarise yourself a bit with the build-in http package of you are new to Go.
I would almost always recommend using the OpenAPI tools generator. It is compatible with both gin and echo:
https://github.com/OpenAPITools/...
It allows you to focus on on designing the spec in yaml/json/swagger-ui and already handles some basic validation for you.
You probably also want to check out echo and compare it to gin to see what suits the project best. The build in package probably isn't going to cut it. -
Why is a beginner in charge of making the tech stack for a huge commercial project?
-
scout28123y@mabbott94 awesome thanks.
I’m not a new dev, I work on many techs from almost a decade. With go, I have built small stuff using mux, net/http etc. they have worked good enough for me so far but they were only pet projects for learning. But now this is first big one and it really is big. So to use gin or echo or just mux, I’m unable to decide. -
scout28123y@mabbott94 I just thought that gin is huge framework so that would be handling a lot of things which I don’t know? If it’s not so then I don’t see why such a heavy thing should be used. Why do people use it anyway?
-
@C0D4 no not really. With Golang I (much like with everything else really) take a library oriented approach rather than the framework approach. We have some golang based products, very small things at work ranging from cli tools to small restful api servers in which I use the base net/http libraries for most of it coupled with gorilla and gorm among other small libs.
I wouldn't know how well Gin compares. But judging by how the community in Golang is, it seems that they all prefer to build everything using a selection of libraries rather than an all inclusive framework. I don't think there is anything bad with it, this is more of a preference to me. Gin might be fantastic, but I have never used it.
Golang - should I use gin or should I not? Beginner here…..
It’s for a huge e-commerce rest api btw
rant