From be3cd6bf181002648f48935fda6c1da36a08e7a9 Mon Sep 17 00:00:00 2001 From: Kevin Goslar Date: Wed, 11 Dec 2019 08:08:02 -0500 Subject: [PATCH] Update uuid --- cmd_plus.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd_plus.go b/cmd_plus.go index 2738aa2..3cd6efb 100644 --- a/cmd_plus.go +++ b/cmd_plus.go @@ -60,7 +60,12 @@ func (c *CmdPlus) GetOutput() string { // It will immediately send an OutputChunk with an empty chunk and the full output // thus far. It also returns a function that when called closes the channel func (c *CmdPlus) GetOutputChannel() (chan OutputChunk, func()) { - id := uuid.NewV4().String() + idv4, err := uuid.NewV4() + if err != nil { + fmt.Printf("cannot create new UUID: %v", err) + os.Exit(1) + } + id := idv4.String() c.mutex.Lock() defer c.mutex.Unlock() c.outputChannels[id] = make(chan OutputChunk)