Home > OS >  Slack mentions in golang templates
Slack mentions in golang templates

Time:10-19

I am using go gitlab package to fetch users from gitlab. While trying to tag a person in slack in my go template using the following syntax @{{.Name}} , Slack receives a string @Foo Bar, but the person is not actually being tagged. Are there any workarounds available? Here's the screenshot of slack output

CodePudding user response:

Based on the details mentioned in the question.

You are using @{{.Name}}.

@SlackId should be used to tag a user instead of @UserName

To tag a user for mentions, you will need their Slack ID

  • Related