Fix inconsistencies in variable names for struct methods (#13561)

Этот коммит содержится в:
Jesús Espino
2020-01-07 10:47:03 +01:00
коммит произвёл GitHub
родитель d8ac09b302
Коммит 092e53ace2
22 изменённых файлов: 391 добавлений и 391 удалений

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

@@ -24,17 +24,17 @@ func (a *App) ProcessSlackText(text string) string {
// can be found in the text attribute, or in the pretext, text, title and value
// attributes of the attachment structure. The Slack attachment structure is
// documented here: https://api.slack.com/docs/attachments
func (app *App) ProcessSlackAttachments(a []*model.SlackAttachment) []*model.SlackAttachment {
var nonNilAttachments = model.StringifySlackFieldValue(a)
for _, attachment := range a {
attachment.Pretext = app.ProcessSlackText(attachment.Pretext)
attachment.Text = app.ProcessSlackText(attachment.Text)
attachment.Title = app.ProcessSlackText(attachment.Title)
func (a *App) ProcessSlackAttachments(attachments []*model.SlackAttachment) []*model.SlackAttachment {
var nonNilAttachments = model.StringifySlackFieldValue(attachments)
for _, attachment := range attachments {
attachment.Pretext = a.ProcessSlackText(attachment.Pretext)
attachment.Text = a.ProcessSlackText(attachment.Text)
attachment.Title = a.ProcessSlackText(attachment.Title)
for _, field := range attachment.Fields {
if field.Value != nil {
// Ensure the value is set to a string if it is set
field.Value = app.ProcessSlackText(fmt.Sprintf("%v", field.Value))
field.Value = a.ProcessSlackText(fmt.Sprintf("%v", field.Value))
}
}
}