From e38ade946a6338b4383a3dc0def5b525145baf01 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2020 13:56:16 +0000 Subject: [PATCH 01/16] Bump github.com/nicklaw5/helix from 0.5.9 to 0.7.0 Bumps [github.com/nicklaw5/helix](https://github.com/nicklaw5/helix) from 0.5.9 to 0.7.0. - [Release notes](https://github.com/nicklaw5/helix/releases) - [Commits](https://github.com/nicklaw5/helix/compare/v0.5.9...v0.7.0) Signed-off-by: dependabot-preview[bot] --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 3b7706f8..f2368896 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/logrusorgru/aurora v0.0.0-20190803045625-94edacc10f9b github.com/microsoft/azure-devops-go-api/azuredevops v0.0.0-20191014190507-26902c1d4325 github.com/mmcdole/gofeed v1.1.0 - github.com/nicklaw5/helix v0.5.9 + github.com/nicklaw5/helix v0.7.0 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4 github.com/olekukonko/tablewriter v0.0.4 diff --git a/go.sum b/go.sum index 855ec14d..91572123 100644 --- a/go.sum +++ b/go.sum @@ -560,6 +560,8 @@ github.com/ncw/swift v0.0.0-20171019114456-c95c6e5c2d1a h1:SAjW6pL/9NssyKM1Qvyy5 github.com/ncw/swift v0.0.0-20171019114456-c95c6e5c2d1a/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/nicklaw5/helix v0.5.9 h1:THNJ3o+OM+Dh1gPD9qh2jQlVRTPhjB0rYVBus+9GoB4= github.com/nicklaw5/helix v0.5.9/go.mod h1:nRcok4VLg8ONQYW/iXBZ24wcfiJjTlDbhgk0ZatOrUY= +github.com/nicklaw5/helix v0.7.0 h1:+E8YUqNewLFX0jSxlzKvDpyOs/v299ZZtp1aEqlonWk= +github.com/nicklaw5/helix v0.7.0/go.mod h1:nRcok4VLg8ONQYW/iXBZ24wcfiJjTlDbhgk0ZatOrUY= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= From c8562c533b7538ae9556df5e6bd477c9e048df92 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2020 05:53:57 +0000 Subject: [PATCH 02/16] Bump github.com/shirou/gopsutil Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.8+incompatible to 2.20.9+incompatible. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](https://github.com/shirou/gopsutil/compare/v2.20.8...v2.20.9) Signed-off-by: dependabot-preview[bot] --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d6ef57a8..2316fc8a 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/pkg/profile v1.5.0 github.com/radovskyb/watcher v1.0.7 github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35 - github.com/shirou/gopsutil v2.20.8+incompatible + github.com/shirou/gopsutil v2.20.9+incompatible github.com/spf13/cobra v0.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.6.1 // indirect diff --git a/go.sum b/go.sum index 33c9cdca..9746fe41 100644 --- a/go.sum +++ b/go.sum @@ -674,6 +674,8 @@ github.com/sguiheux/go-coverage v0.0.0-20190710153556-287b082a7197/go.mod h1:0hh github.com/shirou/gopsutil v0.0.0-20170406131756-e49a95f3d5f8/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= +github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= From b8168ce7f2e19b404ce451e04e45d005628d4adb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2020 05:49:32 +0000 Subject: [PATCH 03/16] Bump github.com/digitalocean/godo from 1.44.0 to 1.46.0 Bumps [github.com/digitalocean/godo](https://github.com/digitalocean/godo) from 1.44.0 to 1.46.0. - [Release notes](https://github.com/digitalocean/godo/releases) - [Changelog](https://github.com/digitalocean/godo/blob/main/CHANGELOG.md) - [Commits](https://github.com/digitalocean/godo/compare/v1.44.0...v1.46.0) Signed-off-by: dependabot-preview[bot] --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2ff4943d..9c2adb44 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/briandowns/openweathermap v0.0.0-20180804155945-5f41b7c9d92d github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e - github.com/digitalocean/godo v1.44.0 + github.com/digitalocean/godo v1.46.0 github.com/docker/distribution v2.7.1+incompatible // indirect github.com/docker/docker v1.13.1 github.com/docker/docker-credential-helpers v0.6.3 diff --git a/go.sum b/go.sum index 5f1f9853..8d74f33c 100644 --- a/go.sum +++ b/go.sum @@ -174,6 +174,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.44.0 h1:IMElzMUpO1dVR8qjSg53+5vDkOLzMbhJt4yTAq7NGCQ= github.com/digitalocean/godo v1.44.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.46.0 h1:WRbwjATilgz2NE4NGMeSDpeicy9h4xSKNGuRJ/Nq/fA= +github.com/digitalocean/godo v1.46.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31 h1:Dzuw9GtbmllUqEcoHfScT9YpKFUssSiZ5PgZkIGf/YQ= From 57bf5c7417cbd5d60d413397ca1b5fbfe608bead Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Tue, 6 Oct 2020 23:15:41 -0400 Subject: [PATCH 04/16] Have cmdrunner use a tty This lets us get proper coloring Fixes #577 --- go.mod | 3 ++- go.sum | 11 ++++++++--- modules/cmdrunner/widget.go | 9 +++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 2ff4943d..8b46c270 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( github.com/briandowns/openweathermap v0.0.0-20180804155945-5f41b7c9d92d github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e + github.com/creack/pty v1.1.11 github.com/digitalocean/godo v1.44.0 github.com/docker/distribution v2.7.1+incompatible // indirect github.com/docker/docker v1.13.1 @@ -51,7 +52,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 github.com/radovskyb/watcher v1.0.7 - github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35 + github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6 github.com/shirou/gopsutil v2.20.8+incompatible github.com/spf13/cobra v0.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 5f1f9853..440b5f75 100644 --- a/go.sum +++ b/go.sum @@ -162,6 +162,8 @@ github.com/creack/pty v1.1.7 h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/dancannon/gorethink v4.0.0+incompatible h1:KFV7Gha3AuqT+gr0B/eKvGhbjmUv0qGF43aKCIKVE9A= github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= @@ -502,6 +504,8 @@ github.com/mattn/go-runewidth v0.0.1/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= @@ -650,8 +654,8 @@ github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 h1:dY6ETXrvDG7Sa4vE8ZQG4yqWg6UnOcbqTAahkV813vQ= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35 h1:iSQ9CjsvareuUUlmHAQKpn4+ZjZjMtldyygiOH3G3+s= -github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35/go.mod h1:/rBeY22VG2QprWnEqG57IBC8biVu3i0DOIjRLc9I8H0= +github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6 h1:LhmHZTzElCYlOXEWXWOQXy/vgjPsdiDb7LzHV8mTKvI= +github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6/go.mod h1:xV4Aw4WIX8cmhg71U7MUHBdpIQ7zSEXdRruGHLaEAOc= github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -902,7 +906,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191018095205-727590c5006e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -923,6 +926,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443 h1:X18bCaipMcoJGm27Nv7zr4XYPKGUy92GtqboKC2Hxaw= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/modules/cmdrunner/widget.go b/modules/cmdrunner/widget.go index aa733e6b..2d4050f3 100644 --- a/modules/cmdrunner/widget.go +++ b/modules/cmdrunner/widget.go @@ -3,11 +3,13 @@ package cmdrunner import ( "bytes" "fmt" + "io" "os" "os/exec" "strings" "sync" + "github.com/creack/pty" "github.com/rivo/tview" "github.com/wtfutil/wtf/view" ) @@ -121,10 +123,13 @@ func runCommandLoop(widget *Widget) { <-widget.runChan widget.resetBuffer() cmd := exec.Command(widget.settings.cmd, widget.settings.args...) - cmd.Stdout = widget cmd.Env = widget.environment() - err := cmd.Run() + f, err := pty.Start(cmd) + if err != nil { + panic(err) + } + io.Copy(widget.buffer, f) // The command has exited, print any error messages if err != nil { widget.m.Lock() From 34154620f6e698dcdddf0b88060dd5273bf3d2e2 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Wed, 7 Oct 2020 00:15:35 -0400 Subject: [PATCH 05/16] Handle error handling better Don't panic Add function due to reuse Catch all errors to appease CI --- modules/cmdrunner/widget.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/cmdrunner/widget.go b/modules/cmdrunner/widget.go index 2d4050f3..77ea058a 100644 --- a/modules/cmdrunner/widget.go +++ b/modules/cmdrunner/widget.go @@ -125,24 +125,28 @@ func runCommandLoop(widget *Widget) { cmd := exec.Command(widget.settings.cmd, widget.settings.args...) cmd.Env = widget.environment() f, err := pty.Start(cmd) - if err != nil { - panic(err) - } - - io.Copy(widget.buffer, f) // The command has exited, print any error messages if err != nil { - widget.m.Lock() - _, writeErr := widget.buffer.WriteString(err.Error()) - if writeErr != nil { - return - } - widget.m.Unlock() + widget.handleError(err) + } + + _, err = io.Copy(widget.buffer, f) + if err != nil { + widget.handleError(err) } widget.redrawChan <- true } } +func (widget *Widget) handleError(err error) { + widget.m.Lock() + _, writeErr := widget.buffer.WriteString(err.Error()) + if writeErr != nil { + return + } + widget.m.Unlock() +} + func redrawLoop(widget *Widget) { for { widget.Redraw(widget.content) From e23cec28971c6d5612a0b8b2c01d217aa6bc0efd Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Wed, 7 Oct 2020 18:49:21 -0400 Subject: [PATCH 06/16] Let pty be optional --- modules/cmdrunner/settings.go | 2 ++ modules/cmdrunner/widget.go | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/modules/cmdrunner/settings.go b/modules/cmdrunner/settings.go index 7f88f89f..faa7dda9 100644 --- a/modules/cmdrunner/settings.go +++ b/modules/cmdrunner/settings.go @@ -18,6 +18,7 @@ type Settings struct { args []string `help:"The arguments to the command, with each item as an element in an array. Example: for curl -I cisco.com, the arguments array would be ['-I', 'cisco.com']."` cmd string `help:"The terminal command to be run, withouth the arguments. Ie: ping, whoami, curl."` tail bool `help:"Automatically scroll to the end of the command output."` + pty bool `help:"Run the command in a pseudo-terminal. Some apps will behave differently if they feel in a terminal. For example, some apps will produce colorized output in a terminal, and non-colorized output otherwise. Default false" optional:"true"` maxLines int `help:"Maximum number of lines kept in the buffer."` // The dimensions of the module @@ -32,6 +33,7 @@ func NewSettingsFromYAML(name string, moduleConfig *config.Config, globalConfig args: utils.ToStrs(moduleConfig.UList("args")), cmd: moduleConfig.UString("cmd"), + pty: moduleConfig.UBool("pty", false), tail: moduleConfig.UBool("tail", false), maxLines: moduleConfig.UInt("maxLines", 256), } diff --git a/modules/cmdrunner/widget.go b/modules/cmdrunner/widget.go index 77ea058a..ecb4f2f0 100644 --- a/modules/cmdrunner/widget.go +++ b/modules/cmdrunner/widget.go @@ -124,13 +124,12 @@ func runCommandLoop(widget *Widget) { widget.resetBuffer() cmd := exec.Command(widget.settings.cmd, widget.settings.args...) cmd.Env = widget.environment() - f, err := pty.Start(cmd) - // The command has exited, print any error messages - if err != nil { - widget.handleError(err) + var err error + if widget.settings.pty { + err = runCommandPty(widget, cmd) + } else { + err = runCommand(widget, cmd) } - - _, err = io.Copy(widget.buffer, f) if err != nil { widget.handleError(err) } @@ -138,6 +137,22 @@ func runCommandLoop(widget *Widget) { } } +func runCommand(widget *Widget, cmd *exec.Cmd) error { + cmd.Stdout = widget + return cmd.Run() +} + +func runCommandPty(widget *Widget, cmd *exec.Cmd) error { + f, err := pty.Start(cmd) + // The command has exited, print any error messages + if err != nil { + return err + } + + _, err = io.Copy(widget.buffer, f) + return err +} + func (widget *Widget) handleError(err error) { widget.m.Lock() _, writeErr := widget.buffer.WriteString(err.Error()) From 7643109c6348124051bcabf655ea5b954a65dd90 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Thu, 8 Oct 2020 08:17:52 -0400 Subject: [PATCH 07/16] Fix unlocking bug noticed during refactor --- modules/cmdrunner/widget.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cmdrunner/widget.go b/modules/cmdrunner/widget.go index ecb4f2f0..0eca5aec 100644 --- a/modules/cmdrunner/widget.go +++ b/modules/cmdrunner/widget.go @@ -155,11 +155,11 @@ func runCommandPty(widget *Widget, cmd *exec.Cmd) error { func (widget *Widget) handleError(err error) { widget.m.Lock() + defer widget.m.Unlock() _, writeErr := widget.buffer.WriteString(err.Error()) if writeErr != nil { return } - widget.m.Unlock() } func redrawLoop(widget *Widget) { From 534514f558ea2cf9ea4a50d84ca69a25a3f0840f Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 8 Oct 2020 11:42:45 -0700 Subject: [PATCH 08/16] go mod tidy Signed-off-by: Chris Cummer --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 8d74f33c..e1a7ed50 100644 --- a/go.sum +++ b/go.sum @@ -172,8 +172,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.44.0 h1:IMElzMUpO1dVR8qjSg53+5vDkOLzMbhJt4yTAq7NGCQ= -github.com/digitalocean/godo v1.44.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/digitalocean/godo v1.46.0 h1:WRbwjATilgz2NE4NGMeSDpeicy9h4xSKNGuRJ/Nq/fA= github.com/digitalocean/godo v1.46.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= From 8d517eeb5ead406913206fafd1431c935345d100 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 8 Oct 2020 11:44:34 -0700 Subject: [PATCH 09/16] go mod tidy Signed-off-by: Chris Cummer --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index b44e47a4..eacbf25d 100644 --- a/go.sum +++ b/go.sum @@ -551,8 +551,6 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1 github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/ncw/swift v0.0.0-20171019114456-c95c6e5c2d1a h1:SAjW6pL/9NssyKM1Qvyy5/V4kR3z76qlTbaqJLixhP4= github.com/ncw/swift v0.0.0-20171019114456-c95c6e5c2d1a/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/nicklaw5/helix v0.5.9 h1:THNJ3o+OM+Dh1gPD9qh2jQlVRTPhjB0rYVBus+9GoB4= -github.com/nicklaw5/helix v0.5.9/go.mod h1:nRcok4VLg8ONQYW/iXBZ24wcfiJjTlDbhgk0ZatOrUY= github.com/nicklaw5/helix v0.7.0 h1:+E8YUqNewLFX0jSxlzKvDpyOs/v299ZZtp1aEqlonWk= github.com/nicklaw5/helix v0.7.0/go.mod h1:nRcok4VLg8ONQYW/iXBZ24wcfiJjTlDbhgk0ZatOrUY= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= From 05b9d8adcacbbb6c7d010f93bd272ae2fe860642 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 8 Oct 2020 11:46:37 -0700 Subject: [PATCH 10/16] go mod tidy Signed-off-by: Chris Cummer --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 3c179ff8..b28f4959 100644 --- a/go.sum +++ b/go.sum @@ -672,8 +672,6 @@ github.com/sethgrid/pester v0.0.0-20171127025028-760f8913c048/go.mod h1:Ad7IjTpv github.com/sguiheux/go-coverage v0.0.0-20190710153556-287b082a7197 h1:qu90yDtRE5WEfRT5mn9v0Xz9RaopLguhbPwZKx4dHq8= github.com/sguiheux/go-coverage v0.0.0-20190710153556-287b082a7197/go.mod h1:0hhKrsUsoT7yvxwNGKa+TSYNA26DNWMqReeZEQq/9FI= github.com/shirou/gopsutil v0.0.0-20170406131756-e49a95f3d5f8/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil v2.20.8+incompatible h1:8c7Atn0FAUZJo+f4wYbN0iVpdWniCQk7IYwGtgdh1mY= -github.com/shirou/gopsutil v2.20.8+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= From 7ce124aaabc8472ae5e837af9d849da8078a5fd1 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 8 Oct 2020 11:47:44 -0700 Subject: [PATCH 11/16] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1500816..0fab9753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,12 +17,13 @@ ### 👍 Updated * Updated `github.com/gdamore/tcell` from 1.3.0 to 1.4.0 -* Updated `github.com/shirou/gopsutil` from 2.20.7+incompatible to 2.20.8+incompatible +* Updated `github.com/shirou/gopsutil` from 2.20.7+incompatible to 2.20.9+incompatible * Updated `github.com/mmcdole/gofeed` from 1.0.0 to 1.1.0 -* Updated `github.com/digitalocean/godo` from 1.42.1 to 1.44.0 +* Updated `github.com/digitalocean/godo` from 1.42.1 to 1.46.0 * Updated `github.com/xanzy/go-gitlab` from 0.33.0 to 0.38.1 * Updated `github.com/adlio/trello` from 1.7.0 to 1.8.0 * Updated `github.com/alecthomas/chroma` from 0.8.0 to 0.8.1 +* Updated `github.com/nicklaw5/helix` from 0.5.9 to 0.7.0 * Now requires Go 1.15 for compilation in Dockerfiles and go.mod, by [@seanstoppable](https://github.com/Seanstoppable) From cb29f8126cb5401141cd5de86df7139c6c3d27b3 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Thu, 8 Oct 2020 14:54:25 -0400 Subject: [PATCH 12/16] Downgrade tview --- go.mod | 2 +- go.sum | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 8b46c270..88b03863 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 github.com/radovskyb/watcher v1.0.7 - github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6 + github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35 github.com/shirou/gopsutil v2.20.8+incompatible github.com/spf13/cobra v0.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 440b5f75..372dbd07 100644 --- a/go.sum +++ b/go.sum @@ -504,8 +504,6 @@ github.com/mattn/go-runewidth v0.0.1/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= @@ -654,8 +652,8 @@ github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 h1:dY6ETXrvDG7Sa4vE8ZQG4yqWg6UnOcbqTAahkV813vQ= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6 h1:LhmHZTzElCYlOXEWXWOQXy/vgjPsdiDb7LzHV8mTKvI= -github.com/rivo/tview v0.0.0-20200915114512-42866ecf6ca6/go.mod h1:xV4Aw4WIX8cmhg71U7MUHBdpIQ7zSEXdRruGHLaEAOc= +github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35 h1:iSQ9CjsvareuUUlmHAQKpn4+ZjZjMtldyygiOH3G3+s= +github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35/go.mod h1:/rBeY22VG2QprWnEqG57IBC8biVu3i0DOIjRLc9I8H0= github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -906,6 +904,7 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191018095205-727590c5006e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= From b1022d6d183178a79da4e0f00d60d0e907774ddc Mon Sep 17 00:00:00 2001 From: Jason Schweier Date: Wed, 7 Oct 2020 19:01:41 -0400 Subject: [PATCH 13/16] Fix typo --- cfg/config_files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg/config_files.go b/cfg/config_files.go index cf65dec3..9e7ceb40 100644 --- a/cfg/config_files.go +++ b/cfg/config_files.go @@ -29,7 +29,7 @@ const ( // CreateFile creates the named file in the config directory, if it does not already exist. // If the file exists it does not recreate it. -// If successful, eturns the absolute path to the file +// If successful, returns the absolute path to the file // If unsuccessful, returns an error func CreateFile(fileName string) (string, error) { configDir, err := WtfConfigDir() From 4205327b957a788171fdd119bef95da4f7d551ee Mon Sep 17 00:00:00 2001 From: Jason Schweier Date: Thu, 8 Oct 2020 18:17:30 -0400 Subject: [PATCH 14/16] Test NewModuleValidator func --- app/module_validator.go | 3 +-- app/module_validator_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/module_validator_test.go diff --git a/app/module_validator.go b/app/module_validator.go index bf594164..b5ebf7dc 100644 --- a/app/module_validator.go +++ b/app/module_validator.go @@ -11,8 +11,7 @@ import ( type ModuleValidator struct{} func NewModuleValidator() *ModuleValidator { - val := &ModuleValidator{} - return val + return &ModuleValidator{} } // Validate rolls through all the enabled widgets and looks for configuration errors. diff --git a/app/module_validator_test.go b/app/module_validator_test.go new file mode 100644 index 00000000..39914bd1 --- /dev/null +++ b/app/module_validator_test.go @@ -0,0 +1,11 @@ +package app + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_NewModuleValidator(t *testing.T) { + assert.IsType(t, &ModuleValidator{}, NewModuleValidator()) +} From 9a2bd261c08e9a2b45a3c90cebf690f08b17552a Mon Sep 17 00:00:00 2001 From: Jason Schweier Date: Thu, 8 Oct 2020 19:48:15 -0400 Subject: [PATCH 15/16] Test Validate func --- app/module_validator.go | 83 ++++++++++++++++++++------------ app/module_validator_test.go | 91 ++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 31 deletions(-) diff --git a/app/module_validator.go b/app/module_validator.go index b5ebf7dc..cee8bce2 100644 --- a/app/module_validator.go +++ b/app/module_validator.go @@ -5,11 +5,17 @@ import ( "os" "github.com/logrusorgru/aurora" + "github.com/wtfutil/wtf/cfg" "github.com/wtfutil/wtf/wtf" ) type ModuleValidator struct{} +type widgetError struct { + name string + validationErrors []cfg.Validatable +} + func NewModuleValidator() *ModuleValidator { return &ModuleValidator{} } @@ -17,42 +23,57 @@ func NewModuleValidator() *ModuleValidator { // Validate rolls through all the enabled widgets and looks for configuration errors. // If it finds any it stringifies them, writes them to the console, and kills the app gracefully func (val *ModuleValidator) Validate(widgets []wtf.Wtfable) { - var errStr string - hasErrors := false + validationErrors := validate(widgets) - for _, widget := range widgets { - var widgetErrStr string - - for _, val := range widget.CommonSettings().Validations() { - if val.HasError() { - hasErrors = true - widgetErrStr += fmt.Sprintf(" - %s\t%s %v\n", val, aurora.Red("Error:"), val.Error()) + if len(validationErrors) > 0 { + fmt.Println() + for _, error := range validationErrors { + for _, message := range error.errorMessages() { + fmt.Println(message) } } - - if widgetErrStr != "" { - errStr += fmt.Sprintf( - "%s\n", - fmt.Sprintf( - "%s in %s configuration", - aurora.Red("Errors"), - aurora.Yellow( - fmt.Sprintf( - "%s.position", - widget.Name(), - ), - ), - ), - ) - - errStr += widgetErrStr + "\n" - } - } - - if hasErrors { fmt.Println() - fmt.Println(errStr) os.Exit(1) } } + +func validate(widgets []wtf.Wtfable) (widgetErrors []widgetError) { + for _, widget := range widgets { + error := widgetError{name: widget.Name()} + + for _, val := range widget.CommonSettings().Validations() { + if val.HasError() { + error.validationErrors = append(error.validationErrors, val) + } + } + + if len(error.validationErrors) > 0 { + widgetErrors = append(widgetErrors, error) + } + } + + return widgetErrors +} + +func (err widgetError) errorMessages() (messages []string) { + widgetMessage := fmt.Sprintf( + "%s in %s configuration", + aurora.Red("Errors"), + aurora.Yellow( + fmt.Sprintf( + "%s.position", + err.name, + ), + ), + ) + messages = append(messages, widgetMessage) + + for _, e := range err.validationErrors { + configMessage := fmt.Sprintf(" - %s\t%s %v", e.String(), aurora.Red("Error:"), e.Error()) + + messages = append(messages, configMessage) + } + + return messages +} diff --git a/app/module_validator_test.go b/app/module_validator_test.go index 39914bd1..83108e6b 100644 --- a/app/module_validator_test.go +++ b/app/module_validator_test.go @@ -1,11 +1,102 @@ package app import ( + "fmt" "testing" + "github.com/logrusorgru/aurora" + "github.com/olebedev/config" "github.com/stretchr/testify/assert" + "github.com/wtfutil/wtf/wtf" +) + +const ( + valid = ` +wtf: + mods: + clocks: + enabled: true + position: + top: 0 + left: 0 + height: 1 + width: 1 + refreshInterval: 30` + + invalid = ` +wtf: + mods: + clocks: + enabled: true + position: + top: abc + left: 0 + height: 1 + width: 1 + refreshInterval: 30` ) func Test_NewModuleValidator(t *testing.T) { assert.IsType(t, &ModuleValidator{}, NewModuleValidator()) } + +func Test_validate(t *testing.T) { + tests := []struct { + name string + moduleName string + config *config.Config + expected []string + }{ + { + name: "valid config", + moduleName: "clocks", + config: func() *config.Config { + cfg, _ := config.ParseYaml(valid) + return cfg + }(), + expected: []string{}, + }, + { + name: "invalid config", + moduleName: "clocks", + config: func() *config.Config { + cfg, _ := config.ParseYaml(invalid) + return cfg + }(), + expected: []string{ + fmt.Sprintf("%s in %s configuration", aurora.Red("Errors"), aurora.Yellow("clocks.position")), + fmt.Sprintf( + " - Invalid value for %s: 0 %s strconv.ParseInt: parsing \"abc\": invalid syntax", + aurora.Yellow("top"), + aurora.Red("Error:"), + ), + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + widget := MakeWidget(nil, nil, tt.moduleName, tt.config) + + if widget == nil { + t.Logf("Failed to create widget %s", tt.moduleName) + t.FailNow() + } + + errs := validate([]wtf.Wtfable{widget}) + + if len(tt.expected) == 0 { + assert.Empty(t, errs) + } else { + assert.NotEmpty(t, errs) + + var actual []string + for _, err := range errs { + actual = append(actual, err.errorMessages()...) + } + + assert.Equal(t, tt.expected, actual) + } + }) + } +} From 470a1deb229c1d4f6d36f09cfe7019d71993e730 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Fri, 9 Oct 2020 09:34:50 -0700 Subject: [PATCH 16/16] go mod tidy Signed-off-by: Chris Cummer --- go.mod | 2 +- go.sum | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c431daec..8cfdb8f2 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/briandowns/openweathermap v0.0.0-20180804155945-5f41b7c9d92d github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e - github.com/digitalocean/godo v1.46.0 github.com/creack/pty v1.1.11 + github.com/digitalocean/godo v1.46.0 github.com/docker/distribution v2.7.1+incompatible // indirect github.com/docker/docker v1.13.1 github.com/docker/docker-credential-helpers v0.6.3 diff --git a/go.sum b/go.sum index 12e5016e..c1ec6c28 100644 --- a/go.sum +++ b/go.sum @@ -925,8 +925,6 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443 h1:X18bCaipMcoJGm27Nv7zr4XYPKGUy92GtqboKC2Hxaw= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=