Slack dependency master branch breaks the build
lainra opened this issue · comments
WHAT
Slack dependency master branch breaks the build
➜ go get github.com/mercari/certificate-expiry-monitor-controller/
# github.com/mercari/certificate-expiry-monitor-controller/notifier/slack
../../mercari/certificate-expiry-monitor-controller/notifier/slack/parameter.go:31:3: unknown field 'Attachments' in struct literal of type slack.PostMessageParameters
../../mercari/certificate-expiry-monitor-controller/notifier/slack/slack.go:49:3: cannot use slack.New(token) (type *slack.Client) as type API in field value:
*slack.Client does not implement API (wrong type for PostMessage method)
have PostMessage(string, ...slack.MsgOption) (string, string, error)
want PostMessage(string, string, slack.PostMessageParameters) (string, string, error)
To solve it, I will fix the vendor package version to v0.4.0 (previous working version)
WHY
The PostMessage API method changed in the latest release v0.6.0, breaking the controller build.
Fixed by #8