From 4af5c2f4c6c3d4a7e2800091a00e3ce54afe7791 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Sat, 30 Oct 2021 00:21:58 +0200 Subject: [PATCH] make slack channel configurable --- cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 63b80f7..35a7fc6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -25,6 +25,7 @@ type Config struct { BucketName string `json:"bucket_name"` DBConn string `json:"db_conn"` SlackHookURL string `json:"slack_hook_url"` + SlackChannel string `json:"slack_channel"` UpdateBinURL string `json:"update_bin_url"` UpdateCmd string `json:"update_cmd"` } @@ -102,7 +103,7 @@ func preRun(cmd *cobra.Command, args []string) { hook := &slackrus.SlackrusHook{ HookURL: globalConfig.SlackHookURL, AcceptedLevels: slackrus.LevelThreshold(logrus.InfoLevel), - Channel: "#reflector-logs", + Channel: globalConfig.SlackChannel, //IconEmoji: ":ghost:", //Username: "reflector.go", }