Skip to content

Commit

Permalink
adjust for uuid.NewV4() signature change
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Girardi committed Jan 19, 2018
1 parent 5639a5f commit 95adba4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions todoist/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (i *ID) UnmarshalJSON(b []byte) (err error) {
}

func GenerateTempID() ID {
return ID(uuid.NewV4().String())
u, _ := uuid.NewV4()
return ID(u.String())
}

func IsTempID(id ID) bool {
Expand All @@ -82,7 +83,8 @@ func IsTempID(id ID) bool {
type UUID string

func GenerateUUID() UUID {
return UUID(uuid.NewV4().String())
u, _ := uuid.NewV4()
return UUID(u.String())
}

func (i UUID) MarshalJSON() ([]byte, error) {
Expand Down

0 comments on commit 95adba4

Please sign in to comment.