Skip to content

Commit

Permalink
Merge pull request #382 from hellofresh/patch/stop-using-satori-uuid
Browse files Browse the repository at this point in the history
PT-2875 Replaced satori uuid with gofrs
  • Loading branch information
vgarvardt authored Jan 28, 2019
2 parents 305abe8 + 700d898 commit 68fc4ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions Gopkg.lock

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

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,7 @@
[[constraint]]
name = "github.com/globalsign/mgo"
version = "r2018.04.23"

[[constraint]]
name = "github.com/gofrs/uuid"
version = "3.2.0"
4 changes: 2 additions & 2 deletions pkg/middleware/request_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package middleware
import (
"net/http"

"github.com/gofrs/uuid"
"github.com/hellofresh/janus/pkg/observability"
"github.com/satori/go.uuid"
)

type reqIDKeyType int
Expand All @@ -19,7 +19,7 @@ func RequestID(handler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
requestID := r.Header.Get(requestIDHeader)
if requestID == "" {
requestID = uuid.NewV4().String()
requestID = uuid.Must(uuid.NewV4()).String()
}

r.Header.Set(requestIDHeader, requestID)
Expand Down

0 comments on commit 68fc4ca

Please sign in to comment.