What does HackerNews think of sqlx?

general purpose extensions to golang's database/sql

Language: Go

We've always used https://github.com/jmoiron/sqlx which is just the standard package + mapping to/from structs.
I wish more people encouraged people new to Go to look at some of the targets you'll arrive at so that people don't come into Go thinking the end result is going to be using the Go version of Laravel, Spring, or Rails.

Go has some interesting ideas about models/ORM's, OpenAPI, validation, templates, embedded binary files and other things. When types matter, like in Go, code generation is often very important as well which isn't as common in scripting languages.

https://goa.design/ for grpc/rest servers based on specs

https://gokit.io/ for microservices

https://github.com/mustafaakin/gongular demonstrates object-based validation using struct tags

https://sqlc.dev/ for generated models based on SQL (skip the whole idea of an ORM)

https://github.com/jmoiron/sqlx for more traditional object population from SQL

https://pkg.go.dev/errors for an understanding of wrapping errors and nested error causes

https://gqlgen.com/ for auto-generated revolvers based on GraphQL schemas

https://pkg.go.dev/io#Reader all the Reader/Writer/Closer's as they are everywhere since Go cares about performance and therefore streaming abilities. No more string passing.

As mentioned in the article, flags matter in Go. The most popular https://cobra.dev/ and the simpler https://pkg.go.dev/github.com/peterbourgon/ff/v3/ffcli provide some good examples

This comment is mostly for web apps, different domains will require looking at all the approaches taken in https://github.com/avelino/awesome-go by leading packages

sqlx (1) is probably the closest thing to a tradition ORM that operates this way

^1: https://github.com/jmoiron/sqlx