Skip to content

Commit

Permalink
handle if slack config is empty
Browse files Browse the repository at this point in the history
Signed-off-by: Kedar Vijay Kulkarni <[email protected]>
  • Loading branch information
Kedar Vijay Kulkarni committed Nov 15, 2021
1 parent 2e3274e commit 38eb057
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ func main() {
log.Println(err)
return
}

if slackConfig.ChannelID == "" || slackConfig.UserID == "" || slackConfig.SlackToken == "" {
log.Printf("Oops something went wrong while trying to fetch Slack Config, check config/slack.yaml")
return
}
// fmt.Println("UserID, Channel ID, slackToken: ", slackConfig)
// queries := []string{
// `sum(kube_pod_status_phase{}) by (phase) > 0`, // pod count by phase
Expand Down

0 comments on commit 38eb057

Please sign in to comment.