1
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:
Adhityaa
2018-06-09 14:02:07 +05:30
parent 432ffeebb3
commit 37e772b595
2 changed files with 4 additions and 4 deletions

View File

@ -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
}
}