Earlier quoted context omitted.
Nice new feature, would actually make me want to use Go without Gin.
I am over Gin and have been for years yet everyone keeps using it because it has inertia. The docs are garbage. Big fan of Echo and it has much better docs. https://echo.labstack.com/
Some Go web dev notes
41–50 of 154 posts
Re: Some Go web dev notes
#42GOMEMLIMIT has really cut down on the amount of time I’ve had to spend worrying about the GC. I’d recommend it. Plus, if you’re using kubernetes or docker, you can automatically set it to the orchestrator-managed memory limit using something like https://github.com/KimMachineGun/automemlimit — no need to add any manual config at all.
Re: Some Go web dev notes
#43Earlier quoted context omitted.
Nice new feature, would actually make me want to use Go without Gin.
I am over Gin and have been for years yet everyone keeps using it because it has inertia. The docs are garbage. Big fan of Echo and it has much better docs. https://echo.labstack.com/
Re: Some Go web dev notes
#44It's sad https://pkg.go.dev/embed was not mentioned in a post about web development in Go :-) Having a true single binary bundling your static resources is so convenient.
Re: Some Go web dev notes
#45> In general everything about it feels like it makes projects easy to work on for 5 days, abandon for 2 years, and then get back into writing code without a lot of problems. To me this is one of the most underrated qualities of go code. Go is a language that I started learning years ago, but did't change dramatically. So my knowledge is still useful, even almost ten years later.
I agree but those first 5 days are going to be a mixed bag as you pick through libraries for logging, database drivers, migrations, as well as project organization, dependency injection patterns for testing, organize your testing structure, and more. If you have a template to derive from or sufficient Go experience you'll be fine, but selecting from a grab bag of small libraries early on in a project can be a distrac…
Point being you’re probably going to spend those first five days evaluating the options. The “community” doesn’t know your taste or your needs. You have no idea what their goals are, or what the average skill level is. All of those things can make a big difference in selecting tech to build atop of.
Re: Some Go web dev notes
#46Earlier quoted context omitted.
I don't think this controversial. Retrying failed transactions is a common strategy.
You're the first person I've heard say so. When I was learning DB stuff, there were loads of examples of things that looked at the error from a transaction. Not a single one of them then retried the transaction as a result. The OP's comment is a symptom of this -- they did some writes or some transactions and were getting failures, which means they weren't retrying their transactions. And then when they searched to s…
I agree with you the retrying transactions is relatively simple and powerful.
Re: Some Go web dev notes
#47Earlier quoted context omitted.
I don't think this controversial. Retrying failed transactions is a common strategy.
You're the first person I've heard say so. When I was learning DB stuff, there were loads of examples of things that looked at the error from a transaction. Not a single one of them then retried the transaction as a result. The OP's comment is a symptom of this -- they did some writes or some transactions and were getting failures, which means they weren't retrying their transactions. And then when they searched to s…
Re: Some Go web dev notes
#48> In general everything about it feels like it makes projects easy to work on for 5 days, abandon for 2 years, and then get back into writing code without a lot of problems. To me this is one of the most underrated qualities of go code. Go is a language that I started learning years ago, but did't change dramatically. So my knowledge is still useful, even almost ten years later.
I agree but those first 5 days are going to be a mixed bag as you pick through libraries for logging, database drivers, migrations, as well as project organization, dependency injection patterns for testing, organize your testing structure, and more. If you have a template to derive from or sufficient Go experience you'll be fine, but selecting from a grab bag of small libraries early on in a project can be a distrac…
I'm not saying you need to stay there, but if your project environment feels like Rails or Flask or whatever in your first month or two, you may have done something wrong.
Re: Some Go web dev notes
#49go build ./... Goes where ?
Re: Some Go web dev notes
#50> I learned the hard way that if I don’t do this then I’ll get SQLITE_BUSY errors from two threads trying to write to the db at the same time. OK, here's a potentially controversial opinion from someone coming into the web + DB field from writing operating systems: 1. Database transactions are designed to fail Therefore 2. All database transactions should done in a transaction loop Basically something like this: http…
Is there a place that documents what the set-and-forget setting should be?