Permalink
Browse files

Switch to github.com/google/uuid dependency.

It seems to be more well maintained and reliable at this time.

google/uuid works out of box with Go modules, because the most recently
tagged version is compatible with master (at this time, they're equal).
On the other hand, using satori/go.uuid requires reverting back to an
older API because its latest tag is more significantly behind master.
See satori/go.uuid#90, satori/go.uuid#82, satori/go.uuid#76.
  • Loading branch information...
dmitshur committed Dec 22, 2018
1 parent 2ed0895 commit e3254af305572bce7798a62a20a19271f97f0e75
Showing with 2 additions and 2 deletions.
  1. +2 −2 usercontent.go
@@ -7,7 +7,7 @@ import (
"os"
pathpkg "path"

"github.com/satori/go.uuid"
"github.com/google/uuid"
"github.com/shurcooL/httperror"
"github.com/shurcooL/users"
"github.com/shurcooL/webdavfs/vfsutil"
@@ -47,7 +47,7 @@ func (uc userContentHandler) Upload(w http.ResponseWriter, req *http.Request) er
return httperror.JSONResponse{V: uploadResponse{Error: err.Error()}}
}

uuid, err := uuid.NewV4()
uuid, err := uuid.NewRandom()
if err != nil {
return httperror.JSONResponse{V: uploadResponse{Error: err.Error()}}
}

0 comments on commit e3254af

Please sign in to comment.