Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Commit f37ef9a

Browse files
committed
Exit with fatal message rather than panic, fixes #24
1 parent 72775c0 commit f37ef9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ func main() {
4949
var err error
5050
cfg, err = initConfig(os.Getenv("GOLANG_ENV"))
5151
if err != nil {
52-
// panic if the server is missing a vital configuration detail
53-
panic(fmt.Errorf("server configuration error: %s", err.Error()))
52+
// fatal if the server is missing a vital configuration detail
53+
log.Fatal(fmt.Errorf("server configuration error: %s", err.Error()))
5454
}
5555

5656
go func() {

0 commit comments

Comments
 (0)