Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix URL parsing and config #2

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ This tool queries the websocket API to get the power usage data for each hour ov

## Installation

Go

```bash
go install github.com/poolski/powertracker@latest
```

[Releases](https://github.com/poolski/powertracker/releases)

## Configuration

This tool requires a configuration file to be present at `~/.config/powertracker/config.yaml`. If one does not exist, it will ask for input and create it for you.
Expand All @@ -30,9 +34,31 @@ Usage:
powertracker [flags]

Flags:
-c, --config string config file (default "/Users/kyrill/.config/powertracker/config.yaml")
-c, --config string config file (default "$HOME_DIR/.config/powertracker/config.yaml")
-f, --csv-file string the path of the CSV file to write to (default "results.csv")
-d, --days int number of days to compute power stats for (default 30)
-h, --help help for powertracker
-i --insecure skip TLS verification
-o, --output string output format (text, table, csv)

```

## Example output

```bash
$ powertracker -d 7 # 7 days' worth of data

+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
| 0.300000 | 0.326000 | 0.333000 | 0.298000 | 0.397000 | 0.554000 | 0.408000 | 0.519000 | 0.552000 | 0.761000 | 0.591000 | 0.564000 | 0.880000 | 0.584000 | 0.636000 | 0.540000 | 1.204000 | 1.272000 | 1.011000 | 0.991000 | 0.386000 | 0.420000 | 0.277000 | 0.376000 |
| 0.374000 | 0.338000 | 0.352000 | 0.361000 | 0.386000 | 0.596000 | 0.499000 | 0.662000 | 0.837000 | 0.643000 | 0.819000 | 0.865000 | 0.680000 | 0.612000 | 0.570000 | 0.793000 | 1.350000 | 1.141000 | 1.179000 | 1.048000 | 0.621000 | 0.422000 | 0.277000 | 0.361000 |
| 0.368000 | 0.442000 | 0.338000 | 0.451000 | 0.349000 | 0.663000 | 1.645000 | 0.655000 | 0.672000 | 0.793000 | 0.577000 | 0.790000 | 0.820000 | 0.529000 | 0.682000 | 0.485000 | 1.827000 | 0.929000 | 0.779000 | 0.973000 | 0.606000 | 0.928000 | 0.338000 | 0.374000 |
| 0.354000 | 0.432000 | 0.390000 | 0.390000 | 0.613000 | 0.827000 | 0.973000 | 0.824000 | 0.438000 | 0.762000 | 0.936000 | 0.830000 | 0.943000 | 0.873000 | 0.749000 | 1.452000 | 1.215000 | 0.729000 | 0.813000 | 0.683000 | 0.529000 | 0.389000 | 0.419000 | 0.404000 |
| 0.370000 | 0.449000 | 0.358000 | 0.400000 | 0.402000 | 0.625000 | 0.567000 | 1.175000 | 1.106000 | 0.448000 | 0.391000 | 0.723000 | 0.604000 | 0.754000 | 0.713000 | 0.830000 | 1.267000 | 1.237000 | 0.865000 | 0.790000 | 0.652000 | 0.649000 | 0.420000 | 0.489000 |
| 0.399000 | 0.372000 | 0.340000 | 0.371000 | 0.373000 | 0.591000 | 0.409000 | 0.744000 | 0.475000 | 0.649000 | 0.433000 | 0.536000 | 0.494000 | 0.561000 | 0.568000 | 0.583000 | 0.519000 | 0.543000 | 0.577000 | 0.483000 | 0.459000 | 0.440000 | 0.432000 | 0.432000 |
| 0.306000 | 0.394000 | 0.344000 | 0.352000 | 0.414000 | 0.617000 | 0.611000 | 0.861000 | 0.897000 | 0.971000 | 0.734000 | 0.552000 | 0.781000 | 0.465000 | 0.553000 | 0.621000 | 0.853000 | 0.776000 | 0.948000 | 0.507000 | 0.864000 | 0.348000 | 0.435000 | 0.331000 |
+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
| 0.353000 | 0.393286 | 0.350714 | 0.374714 | 0.419143 | 0.639000 | 0.730286 | 0.777143 | 0.711000 | 0.718143 | 0.640143 | 0.694286 | 0.743143 | 0.625429 | 0.638714 | 0.757714 | 1.176429 | 0.946714 | 0.881714 | 0.782143 | 0.588143 | 0.513714 | 0.371143 | 0.395286 |
+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
```
35 changes: 31 additions & 4 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package cmd

import (
"crypto/tls"
"encoding/csv"
"fmt"
"net/url"
"os"
"time"

Expand Down Expand Up @@ -36,9 +38,10 @@ type APIResponse struct {
}

var (
days int
output string
csvFile string
days int
output string
csvFile string
insecure bool
)

const hoursInADay = 24
Expand All @@ -47,6 +50,7 @@ func init() {
rootCmd.PersistentFlags().IntVarP(&days, "days", "d", 30, "number of days to compute power stats for")
rootCmd.PersistentFlags().StringVarP(&output, "output", "o", "", "output format (text, table, csv)")
rootCmd.PersistentFlags().StringVarP(&csvFile, "csv-file", "f", "results.csv", "the path of the CSV file to write to")
rootCmd.PersistentFlags().BoolVarP(&insecure, "insecure", "i", false, "skip TLS verification")
}

func (c *Client) Connect() error {
Expand All @@ -57,8 +61,31 @@ func (c *Client) Connect() error {
HandshakeTimeout: 10 * time.Second,
}

// Work out the URL to dial
if viper.GetString("url") == "" {
return fmt.Errorf("url is required")
}
dialURL, err := url.Parse(viper.GetString("url"))
if err != nil {
return err
}
if dialURL.Scheme == "http" {
dialURL.Scheme = "ws"
} else if dialURL.Scheme == "https" {
dialURL.Scheme = "wss"
}
dialURL.Path = "/api/websocket"

// Skip TLS verification if insecure flag is set
if insecure {
dialer.TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
}
}

// Dial the websocket
conn, _, err := dialer.Dial("wss://ha.service.antisp.in/api/websocket", nil)
log.Info().Msgf("connecting to %s", dialURL.String())
conn, _, err := dialer.Dial(dialURL.String(), nil)
if err != nil {
return err
}
Expand Down
41 changes: 27 additions & 14 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package cmd

import (
"fmt"
"net/url"
"os"
"path/filepath"

"github.com/Songmu/prompter"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -67,30 +69,41 @@ func initConfig() {
if _, err := os.Stat(cfgFile); os.IsNotExist(err) {
fmt.Println("No config file found. Let's set one up.")

fmt.Println("Please enter your API key:")
var apiKey string
fmt.Scanln(&apiKey)

fmt.Println("Please enter the URL for your Home Assistant instance (e.g. http://localhost:8123):")
var baseURL string
fmt.Scanln(&baseURL)

viper.Set("api_key", apiKey)
viper.Set("url", baseURL)
err := promtUserConfig()
if err != nil {
log.Fatal().Msgf("prompting user for config: %s", err.Error())
}

err := os.MkdirAll(filepath.Dir(cfgFile), 0755)
err = os.MkdirAll(filepath.Dir(cfgFile), 0755)
if err != nil {
log.Err(err).Msg("creating config directory")
log.Fatal().Msgf("creating config dir: %s", err.Error())
}

f, err := os.Create(cfgFile)
if err != nil {
log.Err(err).Msg("creating file")
log.Fatal().Msgf("creating config file: %s", err.Error())
}
defer f.Close()

if err := viper.WriteConfigAs(cfgFile); err != nil {
log.Err(err).Msg("writing config file")
log.Fatal().Msgf("writing config file: %s", err.Error())
}
}
}

func promtUserConfig() error {
urlPrompt := prompter.Prompt("Home Assistant URL - e.g. http://localhost:8123", "")
token := prompter.Password("Home Assistant Long-Lived Access Token")

haURL, err := url.Parse(urlPrompt)
if haURL.Scheme == "" {
haURL.Scheme = "http"
}
if err != nil {
return err
}

viper.Set("api_key", token)
viper.Set("url", haURL.String())
return nil
}
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ require (
github.com/spf13/viper v1.16.0
)

require golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect

require (
github.com/Songmu/prompter v0.5.1
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -18,12 +21,13 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
Expand Down
14 changes: 14 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Songmu/prompter v0.5.1 h1:IAsttKsOZWSDw7bV1mtGn9TAmLFAjXbp9I/eYmUUogo=
github.com/Songmu/prompter v0.5.1/go.mod h1:CS3jEPD6h9IaLaG6afrl1orTgII9+uDWuw95dr6xHSw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
Expand All @@ -49,13 +51,15 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
Expand Down Expand Up @@ -98,6 +102,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -131,8 +136,10 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
Expand All @@ -149,9 +156,11 @@ github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZ
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c=
github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w=
Expand All @@ -178,6 +187,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -322,6 +333,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
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=
Expand Down Expand Up @@ -475,6 +488,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
Expand Down