From 8d88f85f059ada6c966b35b48fbdfcd41284f56e Mon Sep 17 00:00:00 2001 From: sqshq Date: Fri, 21 Jun 2019 00:45:32 -0400 Subject: [PATCH] update to yaml.v3 --- config/config.go | 2 +- example.yml | 44 +++++++++++++++++++++--------------------- go.mod | 2 +- go.sum | 4 ++-- metadata/license.go | 2 +- metadata/statistics.go | 2 +- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/config/config.go b/config/config.go index 01fad02..1160d0c 100644 --- a/config/config.go +++ b/config/config.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/jessevdk/go-flags" "github.com/sqshq/sampler/console" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "io/ioutil" "log" "os" diff --git a/example.yml b/example.yml index 8502826..ce00622 100644 --- a/example.yml +++ b/example.yml @@ -1,5 +1,5 @@ variables: - mongoconnection: mongo --quiet --host=localhost blog + mongoconnection: mongo --quiet --host=localhost blog runcharts: - title: SEARCH ENGINE RESPONSE TIME (sec) position: [[0, 0], [52, 16]] @@ -7,10 +7,10 @@ runcharts: - title: Latency threshold exceeded condition: echo "$prev < 0.8 && $cur > 0.8" |bc -l actions: - terminal-bell: true - sound: true - visual: true - script: 'say alert: ${label} latency exceeded ${cur} second' + terminal-bell: true + sound: true + visual: true + script: 'say alert: ${label} latency exceeded ${cur} second' scale: 3 items: - label: GOOGLE @@ -22,8 +22,8 @@ runcharts: - title: MONGO COLLECTIONS COUNT position: [[53, 0], [27, 8]] legend: - enabled: true - details: false + enabled: true + details: false scale: 0 items: - label: ACTIVE @@ -57,41 +57,41 @@ gauges: - title: YEAR PROGRESS position: [[53, 8], [27, 2]] cur: - sample: date +%j + sample: date +%j max: - sample: echo 365 + sample: echo 365 min: - sample: echo 0 + sample: echo 0 - title: DAY PROGRESS position: [[53, 10], [27, 2]] cur: - sample: date +%H + sample: date +%H max: - sample: echo 24 + sample: echo 24 min: - sample: echo 0 + sample: echo 0 - title: HOUR PROGRESS position: [[53, 12], [27, 2]] cur: - sample: date +%M + sample: date +%M max: - sample: echo 60 + sample: echo 60 min: - sample: echo 0 + sample: echo 0 - title: MINUTE PROGRESS position: [[53, 14], [27, 2]] triggers: - title: CLOCK BELL EVERY MINUTE condition: '[ $label == "cur" ] && [ $cur -eq 0 ] && echo 1 || echo 0' actions: - sound: true - script: say -v samantha `date +%I:%M%p` + sound: true + script: say -v samantha `date +%I:%M%p` cur: - sample: date +%S + sample: date +%S max: - sample: echo 60 + sample: echo 60 min: - sample: echo 0 + sample: echo 0 sparklines: - title: CPU usage position: [[28, 22], [24, 7]] @@ -111,8 +111,8 @@ textboxes: position: [[8, 30], [13, 7]] rate-ms: 10000 sample: curl wttr.in/newyork?0ATQF - border: false transform: echo 1 + border: false - title: San Francisco weather position: [[17, 30], [13, 7]] rate-ms: 10000 diff --git a/go.mod b/go.mod index 7f4d186..24149c2 100644 --- a/go.mod +++ b/go.mod @@ -10,5 +10,5 @@ require ( github.com/mattn/go-runewidth v0.0.4 github.com/mbndr/figlet4go v0.0.0-20190224160619-d6cef5b186ea github.com/mitchellh/go-wordwrap v1.0.0 // indirect - gopkg.in/yaml.v2 v2.2.2 + gopkg.in/yaml.v3 v3.0.0-20190502103701-55513cacd4ae ) diff --git a/go.sum b/go.sum index d7336f0..fd537ba 100644 --- a/go.sum +++ b/go.sum @@ -29,5 +29,5 @@ github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20190502103701-55513cacd4ae h1:ehhBuCxzgQEGk38YjhFv/97fMIc2JGHZAhAWMmEjmu0= +gopkg.in/yaml.v3 v3.0.0-20190502103701-55513cacd4ae/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/metadata/license.go b/metadata/license.go index f5a67e6..1fee655 100644 --- a/metadata/license.go +++ b/metadata/license.go @@ -1,7 +1,7 @@ package metadata import ( - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "log" ) diff --git a/metadata/statistics.go b/metadata/statistics.go index d64afc4..141ebff 100644 --- a/metadata/statistics.go +++ b/metadata/statistics.go @@ -4,7 +4,7 @@ import ( ui "github.com/gizak/termui/v3" "github.com/sqshq/sampler/config" "github.com/sqshq/sampler/console" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "log" "runtime" )