~/blog/go-ra-valtas-backend-emberkent.mdgit:(main)$cat post.md
cd ..

Switching to Go as a backend person

> After years of PHP and Java, Go is both refreshing and frustrating. The language is small, but my habits aren't.

dateMar 19, 2026
read7 m · read
tagsGoPHPlearning

I started using Go for an internal service where latency mattered. For the first weeks I kept thinking in PHP and writing in Go, and that doesn't work.

##What I love

  • The compiler is your friend. The unused-import error annoys you at first, then you grow to like it.
  • A single binary. Deploy becomes scp, not a container symphony.
  • Goroutines are cheap, and the channel model really does make you think differently.

##What tripped me up

Error handling. The if err != nil feels like noise at first, but you get used to every error being an explicit decision. After PHP's exception culture, that's unusual.

go
row, err := db.Query(ctx, q, id)
if err != nil {
    return fmt.Errorf("fetch user %d: %w", id, err)
}

The %w wrapping is what saved my debugging. The error chain follows the calls, and at the end you know exactly where it blew up.

~/bloggit:(main)$cd ../ # back to the index
> exit 0© 2026 Péter Tamás Czibula