update vendor

Former-commit-id: 8e7fca843e404d34fec071415191657ea554dd05
This commit is contained in:
Gerasimos Maropoulos 2018-04-03 13:07:23 +03:00
parent e9e2998538
commit 989cb3f045
5 changed files with 8 additions and 6 deletions

4
Gopkg.lock generated
View File

@ -164,10 +164,10 @@
revision = "abc90934186a77966e2beeac62ed966aac0561d5" revision = "abc90934186a77966e2beeac62ed966aac0561d5"
[[projects]] [[projects]]
branch = "v1.2.0" branch = "master"
name = "github.com/satori/go.uuid" name = "github.com/satori/go.uuid"
packages = ["."] packages = ["."]
revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" revision = "36e9d2ebbde5e3f13ab2e25625fd453271d6522e"
[[projects]] [[projects]]
branch = "master" branch = "master"

View File

@ -59,8 +59,8 @@
name = "github.com/ryanuber/columnize" name = "github.com/ryanuber/columnize"
[[constraint]] [[constraint]]
branch = "master"
name = "github.com/satori/go.uuid" name = "github.com/satori/go.uuid"
version = "1.2.0"
[[constraint]] [[constraint]]
branch = "master" branch = "master"

View File

@ -10,7 +10,8 @@ type Generator func() string
// DefaultGenerator is the defautl url generator // DefaultGenerator is the defautl url generator
var DefaultGenerator = func() string { var DefaultGenerator = func() string {
return uuid.NewV4().String() id, _ := uuid.NewV4()
return id.String()
} }
// Factory is responsible to generate keys(short urls) // Factory is responsible to generate keys(short urls)

View File

@ -31,8 +31,9 @@ type Error struct {
// New creates and returns an Error with a pre-defined user output message // New creates and returns an Error with a pre-defined user output message
// all methods below that doesn't accept a pointer receiver because actually they are not changing the original message // all methods below that doesn't accept a pointer receiver because actually they are not changing the original message
func New(errMsg string) Error { func New(errMsg string) Error {
uidv4, _ := uuid.NewV4() // skip error.
return Error{ return Error{
ID: uuid.NewV4().String(), ID: uidv4.String(),
Message: Prefix + errMsg, Message: Prefix + errMsg,
} }
} }

View File

@ -124,7 +124,7 @@ func (c Config) Validate() Config {
if c.SessionIDGenerator == nil { if c.SessionIDGenerator == nil {
c.SessionIDGenerator = func() string { c.SessionIDGenerator = func() string {
id := uuid.NewV4() id, _ := uuid.NewV4()
return id.String() return id.String()
} }
} }