Skip to content

Commit 83444f5

Browse files
author
Edward Muller
authored
Merge pull request #5 from ottob/master
Verify on startup that redis url is set
2 parents a88cf1b + 21b3dc9 commit 83444f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ func main() {
2323
}
2424

2525
redisURL := os.Getenv("REDIS_URL")
26+
if redisURL == "" {
27+
log.WithField("REDIS_URL", redisURL).Fatal("$REDIS_URL must be set")
28+
}
2629
redisPool, err := redis.NewRedisPoolFromURL(redisURL)
2730
if err != nil {
2831
log.WithField("url", redisURL).Fatal("Unable to create Redis pool")

0 commit comments

Comments
 (0)