15 minutes news, tips, and tricks on the Go programming language.
I talk about dependencies management in Go. How to keep your dependencies up-to-date and how to check if there's any updates available. What to do when a package change their major version.
List all p…
I was toying with the idea of using WebAssembly runner as a plugin / extension mechanism from a Go (host) program to extend the capabilities of a program at runtime.
* min/max bult-ins coming in 1.21:…
I'm trying to make my open source backend API project StaticBackend as easy as possible to contribute.
Couple of things I've added lately was worth mentionning. GitHub Codespaces is helpful and nicely…
I talk about what I'd love to see coming to web development. While WebAssembly can be used as an alternative to JavaScript, I believe we're not looking into the real problems related to building web …
It has been a rough last 4 months for me and I finally get a chance to restart publishing episodes.
In this episode I talk a bit about what I've seen so far as process / flow for deploing software in…
This is the last episode of 2022. Those are my thoughts about how I think we should try to help more as user of open source project and librairies.
This episode content was inspired by the Gorilla Web…
Go's worker queue pattern:
type WorderPool struct {
queue chan int
}
func (wp *WorkerPool) start() {
for i := 0; i < 500; i++ {
go funcIO {
for id := range wp.queue {
doSomething(id)
…
Let's talk about Go's concurrency. It's a powerful tool to have at your disposal but a hard one to master and use correctly.
At beginning I was deploying my Go servers to a DigitalOcean droplet. But for the last 3 years I'm enjoying Render, which listen to my git push and automatically deploy app for me in a blue-green dep…
I recently created an exportable Go package from StaticBackend, an open source backend API which was self-hosted.
I ended up using the internal package way to heavily and this design decision bite me …
Usage of -ldflags:
go build -ldflags "-X main.varName=from_build" -o mycli
Inside your code:
var varName string
func main() {
fmt.Println(varName) // prints "from_build"
}
Here's what I'm using for Static…
If you'd like to join the dev of StaticBackend a Firebase alternative I'm building in Go you're welcome, there's a discord if you'd want to chat. https://github.com/staticbackendhq/core
If you'd like …
sqlx: https://github.com/jmoiron/sqlx
sqlboiler: https://github.com/volatiletech/sqlboiler
If you're looking to learn how to build web API with Go, checkout my course on building SaaS in Go.
I've been maintaining 20 years old systems for a long time now. I've been working with legacy applications in .NET. To me Go has some great advantages built-in by design that should help in 10-15 yea…
What are you thinking about Generics? What about 3rd party libraries that will pop from everywhere once Go 1.18 launched?
Personally, I'll appreciate what the std lib offers and will wait before writi…
If you'd like to check the code, the PR is still active.
StaticBackend repo: https://github.com/staticbackendhq/core
My course on Building SaaS in go
Share episode topic idea with me on Twitter @dominic…
We go over what are pointers and when to use or not use them. For instance, this is probably not a good use for pointers.
func main() {
var i int = 10
abc(&i)
}
func abc(i *int) {
*i = 15
}
In my opini…
Don't stress too much about having the "proper" project structure to the point where you might over-engineer or be paralyzed by the thought of doing something wrong.
It's just hard, and even 5+ years …
Example of not using the happy path at 1st indentation:
try {