Let us write a few SQL strings for creating the tables for the preceding train, station, and route resources. We are going to create a project layout for this API. The project layout will look like the following screenshot:
We create our projects in $GOPATH/src/github.com/user/. Here, the user is narenaryan, railAPI is our project source, and dbutils is our own package for handling database initialization utility functions. Let us start with the dbutils/models.go file. I will add three models each for train, station, and schedule in the models.go file:
package dbutilsconst train = ` CREATE ...