Adding users with GORM
So far, we’ve interacted with the database by writing some SQL queries directly. What we’ve done is create and run Go code, which was used to then run SQL code. This is perfectly fine, but there is also a way to run just Go code to interact with a SQL database. On top of this, the data that we are storing in the database will then be unwrapped into Go variables, and the content of a row might define the values of an instance of a Go struct. What we can do to improve and simplify the whole process is abstract the database even more and use an object-relational mapper (ORM). This is a library that matches the tables and their relations as Go structs so that you can insert and retrieve data the same way you would instantiate and delete any instance of a Go struct. An ORM is not generally part of a language, and Go does not provide one by itself. There is, however, a set of third-party libraries, one of which is the de facto ORM for Go, and this is...