November 2018
Intermediate to advanced
346 pages
8h 12m
English
When we started in Chapter 4, Introduction to the ACME Registration Service, we had not used any interfaces at all, and as a result, all of our packages were very tightly coupled with one another. Because of this, our packages had a high resistance to change; none more so than the config package. This was our original Config struct and the global singleton:
// App is the application configvar App *Config// Config defines the JSON format for the config filetype Config struct { // DSN is the data source name (format: https://github.com/go-sql-driver/mysql/#dsn-data-source-name) DSN string // Address is the IP address and port to bind this rest to Address string // BasePrice is the price of registration ...
Read now
Unlock full access