Config bugfix (#104)

* fix some config bugs

* go fmt
This commit is contained in:
Tobi Smethurst 2021-07-19 19:31:47 +02:00 committed by GitHub
parent b1a4f38e38
commit 29bdc41baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -98,7 +98,7 @@ func loadFromFile(path string) (*Config, error) {
return nil, fmt.Errorf("could not read file at path %s: %s", path, err) return nil, fmt.Errorf("could not read file at path %s: %s", path, err)
} }
config := &Config{} config := Empty()
if err := yaml.Unmarshal(bytes, config); err != nil { if err := yaml.Unmarshal(bytes, config); err != nil {
return nil, fmt.Errorf("could not unmarshal file at path %s: %s", path, err) return nil, fmt.Errorf("could not unmarshal file at path %s: %s", path, err)
} }

View file

@ -148,6 +148,7 @@ func derivePGOptions(c *config.Config) (*pg.Options, error) {
case config.DBTLSModeRequire: case config.DBTLSModeRequire:
tlsConfig = &tls.Config{ tlsConfig = &tls.Config{
InsecureSkipVerify: false, InsecureSkipVerify: false,
ServerName: c.DBConfig.Address,
} }
} }