mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
api: use Errorf instead of Fatalf
This commit is contained in:
@ -9,7 +9,7 @@ import (
|
||||
func parseConfig() error {
|
||||
binPath, err := filepath.Abs(filepath.Dir(os.Args[0]))
|
||||
if err != nil {
|
||||
logger.Fatalf("cannot load binary path: %v", err)
|
||||
logger.Errorf("cannot load binary path: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ func parseConfig() error {
|
||||
// Mandatory config parameters
|
||||
for _, env := range []string{"POSTGRES", "PORT", "ORIGIN"} {
|
||||
if os.Getenv(env) == "" {
|
||||
logger.Fatalf("missing %s environment variable", env)
|
||||
logger.Errorf("missing %s environment variable", env)
|
||||
return errorMissingConfig
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user