From 696a9aeee7ab632e5c84a112bd6993b249303789 Mon Sep 17 00:00:00 2001 From: Jordan Knott Date: Tue, 20 Oct 2020 18:52:09 -0500 Subject: [PATCH] refactor: move default viper config values to commands/commands.go --- internal/commands/commands.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 084c173..fe33e95 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -62,6 +62,16 @@ func initConfig() { if _, ok := err.(viper.ConfigFileNotFoundError); !ok { panic(err) } + + viper.SetDefault("server.hostname", "0.0.0.0:3333") + viper.SetDefault("database.host", "127.0.0.1") + viper.SetDefault("database.name", "taskcafe") + viper.SetDefault("database.user", "taskcafe") + viper.SetDefault("database.password", "taskcafe_test") + + viper.SetDefault("queue.broker", "amqp://guest:guest@localhost:5672/") + viper.SetDefault("queue.store", "memcache://localhost:11211") + } // Execute the root cobra command