Skip to content

Commit

Permalink
Merge pull request #4 from jguenther-va/AG-725/link-names
Browse files Browse the repository at this point in the history
Add LinkNames parameter
  • Loading branch information
taylorwiebe authored Dec 4, 2020
2 parents c87159a + 6f3f58a commit 69a34fb
Show file tree
Hide file tree
Showing 67 changed files with 22,927 additions and 18 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VSlack - Go
### Version 1.3.0
### Version 1.4.0
Send messages to slack using a slack incoming web hook in Go.

## Examples
Expand Down Expand Up @@ -65,8 +65,28 @@ func attach() {
```


### @-tagging Users

``` go
func tagging() {
s := vslack.NewVSlack(incomingWebHook)
err := s.SetChannel("#random").
SetIconEmoji(":laughing:").
SetUsername("VSlack").
SetMessage("With great power comes great responsibility, @channel").
SetLinkNames(true).
Send()
if err != nil {
panic(err)
}
}
```

## Change Log

### 1.4.0
- Add LinkNames parameter, for enabling @-tagging of users without having to know their slack userid.

### 1.3.0
- Add mocks to Interface and AttachmentInterface

Expand Down
2 changes: 2 additions & 0 deletions attachment.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package vslack

// AttachmentInterface is the interface for an attachment
//
//go:generate mockery --inpackage --name=AttachmentInterface
type AttachmentInterface interface {
SetText(t string) Attachment
SetColor(c string) Attachment
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/twiebe-va/vslack-go

go 1.15

require github.com/stretchr/testify v1.6.1
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 2 additions & 1 deletion mock_AttachmentInterface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 32 additions & 15 deletions mock_Interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/davecgh/go-spew/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

152 changes: 152 additions & 0 deletions vendor/github.com/davecgh/go-spew/spew/bypass.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 69a34fb

Please sign in to comment.