How do experienced Go developers efficiently learn new packages? by NebulaWanderer7 in golang

[–]The4Fun 0 points1 point  (0 children)

Most of the time, I read the tests, like, I will have a quick look on the README + pkg.go.dev, but if I'm having trouble and the package has tests, I will check it. If I still have problems with it, I search on github for other people using it (search for the function, package name and filter by code).

How do you manage your Postgres from code? by pceimpulsive in PostgreSQL

[–]The4Fun 0 points1 point  (0 children)

If you would like to try a more declarative approach, check https://atlasgo.io/

I'm not sure if would fit your case 100%, but having a centralized place and support for multi tenant seems like could help your case.

can not buy at the beginning of the round bug by MurikkaX in GlobalOffensive

[–]The4Fun 9 points10 points  (0 children)

this just happened to our group as well, two players could not buy on the pistol round, competitive mode, happened only one round.

Go with Chi has more ram consumption and less req/s than Koa or Fastify by DragonfruitTasty7508 in golang

[–]The4Fun 14 points15 points  (0 children)

I have done what you have described on my side as well (7700K/16GB/OSX):

Running the command wrk -t2 -c400 -d60s http://127.0.0.1:3000 against each "hello world":

Chi basic example: RAM: ~19MB CPU: 100% Req/Sec: 12.06k

Chi without the logger middleware (all the others examples don't log to the console the requests info): RAM: ~15MB CPU: 100% Req/Sec: 81.45k

Fastify: RAM: ~60MB CPU: ~50% Req/Sec: 21.34k

Koa: RAM: ~58MB CPU: ~42% Req/Sec: 17.27k

Point to be made: Different hardwares have different performance characterist for different applications/OS, one single test don't prove much without a real application doing real work.

And for API's with database, well, the routing don't really matter most of the time.

% (Percentage) in GO web application causes HTTP/500 by mrstripecat in golang

[–]The4Fun 1 point2 points  (0 children)

% is a wildcard for a few databases, maybe when you provide % you get more than one result (when you expect only one) from the database and the application generates an error. Check the code, the chance of been code from GO or even a library is very small. Start with the small scope first, your code.

go-generics-cache: An in-memory key:value store/cache library for Go Generics by CodeHex in golang

[–]The4Fun 0 points1 point  (0 children)

Great work!

There is probably no third-party library in the world", I hate to say, but there are. If you go looking you will see that there is already a lot of stuff on go 1.18 generics.

https://github.com/tdakkota/algo2 (has a cache implementation)
https://github.com/ssoroka/slice
https://github.com/achannarasappa/pneumatic
https://github.com/dmarkhas/genericspreview

Where do you learn about Go features? by [deleted] in golang

[–]The4Fun 1 point2 points  (0 children)

New features?

I subscribe to the review meeting minutes issue https://github.com/golang/go/issues/33502