Field pointers as column names: compile-checked Go queries without codegen
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
The ant library for Go, maintained by its author, lets you pass pointers to struct fields (e.g. &Users.Age) as column names in chainable query calls, using Go 1.27's new generic methods.