mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 20:11:50 -07:00
Use log.Fatalf + os.Exit instead of panic
This commit is contained in:
parent
13effa050d
commit
e48c64b5af
1 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"log"
|
||||
|
||||
"github.com/gabehf/koito/engine"
|
||||
)
|
||||
|
|
@ -31,7 +32,8 @@ func readEnvOrFile(envName string) string {
|
|||
b, err := os.ReadFile(filename)
|
||||
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("Failed to load file for %s_FILE (%s): %s", envName, filename, err))
|
||||
log.Fatalf("Failed to load file for %s_FILE (%s): %s", envName, filename, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
envContent = strings.TrimSpace(string(b))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue