Skip to content

Commit

Permalink
Merge pull request #13 from francop-eb/replace-satori-uuid
Browse files Browse the repository at this point in the history
pkg satori/go.uuid replaced by google/uuid
  • Loading branch information
fuyufjh authored Dec 11, 2018
2 parents 3e5842a + 2c3b0b8 commit 5c5fd93
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
8 changes: 3 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"time"

"github.com/satori/go.uuid"
"github.com/google/uuid"
)

const (
Expand Down Expand Up @@ -44,10 +44,8 @@ type Client struct {
}

func NewClient(serverURL string, token string) HEC {
id, err := uuid.NewV4()
if err != nil {
panic(err)
}
id := uuid.New()

return &Client{
httpClient: http.DefaultClient,
serverURL: serverURL,
Expand Down
8 changes: 3 additions & 5 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"sync"

"github.com/satori/go.uuid"
"github.com/google/uuid"
)

type Cluster struct {
Expand All @@ -21,10 +21,8 @@ type Cluster struct {
}

func NewCluster(serverURLs []string, token string) HEC {
id, err := uuid.NewV4()
if err != nil {
panic(err)
}
id := uuid.New()

channel := id.String()
clients := make([]*Client, len(serverURLs))
for i, serverURL := range serverURLs {
Expand Down
12 changes: 6 additions & 6 deletions glide.lock

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

4 changes: 2 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package: github.com/fuyufjh/splunk-hec-go
import:
- package: github.com/satori/go.uuid
version: master
- package: github.com/google/uuid
version: 1.0.0
testImport:
- package: github.com/stretchr/testify
version: ^1.1.4

0 comments on commit 5c5fd93

Please sign in to comment.