[MM-20723] Add golint for plugin package to golangci (#13090)

Этот коммит содержится в:
Ben Schumacher
2019-12-05 20:31:53 +01:00
коммит произвёл GitHub
родитель d12bf77f53
Коммит 5122b9e292
12 изменённых файлов: 117 добавлений и 115 удалений

Просмотреть файл

@@ -19,8 +19,8 @@ type configuration struct {
TeamName string
ChannelName string
// channelId is resolved when the public configuration fields above change
channelId string
// channelID is resolved when the public configuration fields above change
channelID string
}
type HelpPlugin struct {
@@ -78,7 +78,7 @@ func (p *HelpPlugin) OnConfigurationChange() error {
return errors.Wrapf(err, "failed to find channel %s", configuration.ChannelName)
}
configuration.channelId = channel.Id
configuration.channelID = channel.Id
p.setConfiguration(configuration)
@@ -89,7 +89,7 @@ func (p *HelpPlugin) MessageHasBeenPosted(c *plugin.Context, post *model.Post) {
configuration := p.getConfiguration()
// Ignore posts not in the configured channel
if post.ChannelId != configuration.channelId {
if post.ChannelId != configuration.channelID {
return
}
@@ -104,7 +104,7 @@ func (p *HelpPlugin) MessageHasBeenPosted(c *plugin.Context, post *model.Post) {
}
p.API.SendEphemeralPost(post.UserId, &model.Post{
ChannelId: configuration.channelId,
ChannelId: configuration.channelID,
Message: "You asked for help? Checkout https://about.mattermost.com/help/",
Props: map[string]interface{}{
"sent_by_plugin": true,