~edwargix/git.sr.ht

1bbbc0beda0c736c30ad6820936198a884fc6f2f — 2xsaiko 5 years ago 04342b3
Use default value for redis-host if value is empty
1 files changed, 2 insertions(+), 2 deletions(-)

M gitsrht-keys/main.go
M gitsrht-keys/main.go => gitsrht-keys/main.go +2 -2
@@ 51,8 51,8 @@ func main() {
		logger.Fatalf("Failed to load config file: %v", err)
	}

	redisHost, ok := config.Get("sr.ht", "redis-host")
	if !ok {
	redisHost, _ := config.Get("sr.ht", "redis-host")
	if redisHost == "" {
		redisHost = "redis://localhost:6379"
	}
	ropts, err := goredis.ParseURL(redisHost)