Last second clean ups
This commit is contained in:
parent
d7ad4108a7
commit
7a2c4b3cef
@ -36,6 +36,8 @@ a := 1 + 2
|
||||
log.Info("1 + 2 successfully Added, outcome is: ", a)
|
||||
```
|
||||
|
||||
- `loghelper.LogError(err)` is a pretty wrapper to output errors.
|
||||
|
||||
## Boot
|
||||
|
||||
The boot package in `internal` is utilized to start the application. Everything in the boot process must complete successfully for the application to start. If it does not, the application will not start.
|
||||
|
@ -92,6 +92,7 @@ func logFile() {
|
||||
}
|
||||
}
|
||||
|
||||
// Format the logger
|
||||
func logFormat() {
|
||||
logFormat := viper.GetString("log.format")
|
||||
|
||||
|
@ -10,10 +10,6 @@ import (
|
||||
|
||||
var _ sql.Database = &DB{}
|
||||
|
||||
// TODO: Make NewPostgresDB accept a string and Config. IT should
|
||||
// Create a driver of its own.
|
||||
// This will make sure that if you want a driver, it conforms to the interface.
|
||||
|
||||
// NewPostgresDB returns a postgres.DB using the provided Config and driver type.
|
||||
func NewPostgresDB(c Config) (*DB, error) {
|
||||
var driver *pgxDriver
|
||||
@ -27,6 +23,7 @@ func NewPostgresDB(c Config) (*DB, error) {
|
||||
return &DB{driver}, nil
|
||||
}
|
||||
|
||||
// Create a driver based on the config
|
||||
func createDriver(c Config) (*pgxDriver, error) {
|
||||
switch c.Driver {
|
||||
case PGX:
|
||||
|
Loading…
Reference in New Issue
Block a user