make slack channel configurable

This commit is contained in:
Niko Storni 2021-10-30 00:21:58 +02:00
parent def0a97f49
commit 4af5c2f4c6

View file

@ -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",
}