Skip to content

Commit

Permalink
Fix unmarshalling of Slack response JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
bittersweet committed Oct 11, 2015
1 parent 9b6e6e7 commit 376cc96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion notifiers/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ func (s *SlackNotifier) SendMessage(eventName string, target string, data []byte
Ok bool `json:"ok"`
Ts string `json:"ts"`
}{}
err = json.Unmarshal(contents, slackResponse)
err = json.Unmarshal(contents, &slackResponse)
if err != nil {
log.Println("json.Unmarshal", err)
}
// TODO: Do something with slack response again, ok key or status code will
// tell us if everything was alright
fmt.Println("Slack response:", slackResponse)
}

0 comments on commit 376cc96

Please sign in to comment.