LoadConfig loads config from config file
(configFile string)
| 109 | |
| 110 | // LoadConfig loads config from config file |
| 111 | func LoadConfig(configFile string) (err error) { |
| 112 | config := util.GetConfig() |
| 113 | |
| 114 | err = config.ReadConfig(configFile) |
| 115 | |
| 116 | if err != nil { |
| 117 | fmt.Printf("error: failed to load config: %s\n", err) |
| 118 | return |
| 119 | } |
| 120 | |
| 121 | err = os.Chdir(path.Dir(configFile)) |
| 122 | if err != nil { |
| 123 | fmt.Printf("error: chdir() failed: %s\n", err) |
| 124 | return |
| 125 | } |
| 126 | |
| 127 | return |
| 128 | } |
| 129 | |
| 130 | func readGooseConfig() (dbType, dbConnection, migrationsPath string, noInit bool) { |
| 131 | config := util.GetConfig() |
nothing calls this directly
no test coverage detected