Currently the DB connection is happening in main():
t := connectToken{conf.ConfValues.DBDriver, conf.ConfValues.DBDSN}
db := connectDb(&t)
It would make more sense if the db connection instance lived together with the configuration logic, and was just passed around the rest of the program as a pointer in the Config struct (there's a TODO in the code).
Currently the DB connection is happening in main():
It would make more sense if the db connection instance lived together with the configuration logic, and was just passed around the rest of the program as a pointer in the Config struct (there's a TODO in the code).