From 658b03fc961dc8d53363853c9a6600ca65d3a427 Mon Sep 17 00:00:00 2001 From: Pascal-Louis Perez Date: Sun, 7 Jan 2018 08:44:21 -0500 Subject: [PATCH] Wrapping guid.NewV4() to get prior behavior returning a single value. Recently, the go.uuid library was modified to return a string, and an error when generating UUIDs. See [1]. For backwards compatibility, a Must func helper is provided which panics if there are any errors, reovering the prior behavior. [1] https://github.com/satori/go.uuid/commit/0ef6afb2f6cdd6cdaeee3885a95099c63f18fc8c#diff-18f04d9ad3369192f1154eb2a981af41 --- sqlx-runner/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-runner/exec.go b/sqlx-runner/exec.go index 46639ef..8ca3474 100644 --- a/sqlx-runner/exec.go +++ b/sqlx-runner/exec.go @@ -718,5 +718,5 @@ func (ex *Execer) queryObject(dest interface{}) error { // uuid generates a UUID. func uuid() string { - return fmt.Sprintf("%s", guid.NewV4()) + return fmt.Sprintf("%s", guid.Must(guid.NewV4())) }