From d7a872d15e3d341c60d9a69803ef546e89a14a9a Mon Sep 17 00:00:00 2001 From: poly Date: Thu, 30 May 2019 08:21:47 +0800 Subject: [PATCH] Switch to go mod --- .travis.yml | 12 +++++--- README.md | 6 ++-- glide.lock | 70 -------------------------------------------- glide.yaml | 10 ------- go.mod | 31 ++++++++++++++++++++ go.sum | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 125 insertions(+), 87 deletions(-) delete mode 100644 glide.lock delete mode 100644 glide.yaml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.travis.yml b/.travis.yml index 1a46ac8..4b8e3bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,13 @@ language: go go: - stable -install: - - go get -v github.com/Masterminds/glide - - glide install +env: + - GO111MODULE=on + +os: + - osx + - linux + - windows script: - go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... @@ -48,4 +52,4 @@ branches: - pre-release notifications: - email: false \ No newline at end of file + email: false diff --git a/README.md b/README.md index 7b855bd..17a03d0 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Token-ticker (or `tt` for short) is a CLI tool for those who are both **Crypto i #### Homebrew ```bash -# work in process +# WIP ``` #### `curl | bash` style downloads to `/usr/local/bin` @@ -47,7 +47,7 @@ Token-ticker (or `tt` for short) is a CLI tool for those who are both **Crypto i $ curl -sfL https://raw.githubusercontent.com/polyrabbit/token-ticker/master/install.sh | bash -s -- -d -b /usr/local/bin ``` -#### Using [Go](https://golang.org/) (1.9+) +#### Using [Go](https://golang.org/) (1.11+) ```bash $ go get -u github.com/polyrabbit/token-ticker ``` @@ -102,7 +102,7 @@ NOTE: some exchanges has a strict rate limit, too frequent refresh may cause you * #### Show specified columns only ```bash -$ tt -s=Symbol,Price binance.BTCUSDT +$ tt --show Symbol,Price binance.BTCUSDT ``` See issue [#3](https://github.com/polyrabbit/token-ticker/issues/3) for a discussion on this feature. diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 7229d7a..0000000 --- a/glide.lock +++ /dev/null @@ -1,70 +0,0 @@ -hash: ec9732a8041de317982a06ca7dcfcab329368517297fc896c675c05c7c952c44 -updated: 2018-05-30T23:18:13.725899+08:00 -imports: -- name: github.com/buger/jsonparser - version: 2cac668e8456b4284edb0715e17e2af02d3ec993 -- name: github.com/fatih/color - version: 507f6050b8568533fb3f5504de8e5205fa62a114 -- name: github.com/fsnotify/fsnotify - version: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 -- name: github.com/gosuri/uilive - version: ac356e6e42cd31fcef8e6aec13ae9ed6fe87713e -- name: github.com/hashicorp/hcl - version: ef8a98b0bbce4a65b5aa4c368430a80ddc533168 - subpackages: - - hcl/ast - - hcl/parser - - hcl/printer - - hcl/scanner - - hcl/strconv - - hcl/token - - json/parser - - json/scanner - - json/token -- name: github.com/magiconair/properties - version: 2c9e9502788518c97fe44e8955cd069417ee89df -- name: github.com/mattn/go-colorable - version: efa589957cd060542a26d2dd7832fd6a6c6c3ade -- name: github.com/mattn/go-isatty - version: 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c -- name: github.com/mattn/go-runewidth - version: ce7b0b5c7b45a81508558cd1dba6bb1e4ddb51bb -- name: github.com/mitchellh/mapstructure - version: bb74f1db0675b241733089d5a1faa5dd8b0ef57b -- name: github.com/olekukonko/tablewriter - version: d4647c9c7a84d847478d890b816b7d8b62b0b279 -- name: github.com/pelletier/go-toml - version: 66540cf1fcd2c3aee6f6787dfa32a6ae9a870f12 -- name: github.com/pkg/errors - version: 816c9085562cd7ee03e7f8188a1cfd942858cded -- name: github.com/sirupsen/logrus - version: bde08903c767a7f835dfbe69f769f4b3225f8b1b -- name: github.com/spf13/afero - version: 63644898a8da0bc22138abf860edaf5277b6102e - subpackages: - - mem -- name: github.com/spf13/cast - version: 8965335b8c7107321228e3e3702cab9832751bac -- name: github.com/spf13/jwalterweatherman - version: 7c0cea34c8ece3fbeb2b27ab9b59511d360fb394 -- name: github.com/spf13/pflag - version: 583c0c0531f06d5278b7d917446061adc344b5cd -- name: github.com/spf13/viper - version: b5e8006cbee93ec955a89ab31e0e3ce3204f3736 -- name: golang.org/x/crypto - version: 1a580b3eff7814fc9b40602fd35256c63b50f491 - subpackages: - - ssh/terminal -- name: golang.org/x/sys - version: 7c87d13f8e835d2fb3a70a2912c811ed0c1d241b - subpackages: - - unix - - windows -- name: golang.org/x/text - version: 5c1cf69b5978e5a34c5f9ba09a83e56acc4b7877 - subpackages: - - transform - - unicode/norm -- name: gopkg.in/yaml.v2 - version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 -testImports: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index 337d16e..0000000 --- a/glide.yaml +++ /dev/null @@ -1,10 +0,0 @@ -package: github.com/polyrabbit/token-ticker -import: -- package: github.com/olekukonko/tablewriter -- package: github.com/spf13/viper - version: ~1.0.2 -- package: github.com/sirupsen/logrus -- package: github.com/spf13/pflag -- package: github.com/fatih/color - version: ~1.6.0 -- package: github.com/buger/jsonparser diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..68ff4d9 --- /dev/null +++ b/go.mod @@ -0,0 +1,31 @@ +module token-ticker + +require ( + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/buger/jsonparser v0.0.0-20180318095312-2cac668e8456 + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fatih/color v0.0.0-20180213133403-507f6050b856 + github.com/gosuri/uilive v0.0.3 + github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce // indirect + github.com/magiconair/properties v0.0.0-20180217134545-2c9e95027885 // indirect + github.com/mattn/go-colorable v0.0.0-20180310133214-efa589957cd0 + github.com/mattn/go-isatty v0.0.0-20171107050531-6ca4dbf54d38 // indirect + github.com/mattn/go-runewidth v0.0.0-20180408055351-ce7b0b5c7b45 // indirect + github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 // indirect + github.com/olekukonko/tablewriter v0.0.0-20180506121414-d4647c9c7a84 + github.com/onsi/ginkgo v1.8.0 // indirect + github.com/onsi/gomega v1.5.0 // indirect + github.com/pelletier/go-toml v0.0.0-20180323185243-66540cf1fcd2 // indirect + github.com/pkg/errors v0.0.0-20180311214515-816c9085562c + github.com/polyrabbit/token-ticker v0.3.0 + github.com/sirupsen/logrus v0.0.0-20180515044140-bde08903c767 + github.com/spf13/afero v0.0.0-20180401205752-63644898a8da // indirect + github.com/spf13/cast v0.0.0-20180214174949-8965335b8c71 // indirect + github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect + github.com/spf13/pflag v0.0.0-20180412120913-583c0c0531f0 + github.com/spf13/viper v0.0.0-20180319185019-b5e8006cbee9 + github.com/stretchr/testify v1.3.0 // indirect + golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78 // indirect + gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect + gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..6974a07 --- /dev/null +++ b/go.sum @@ -0,0 +1,83 @@ +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/buger/jsonparser v0.0.0-20180318095312-2cac668e8456 h1:SnUWpAH4lEUoS86woR12h21VMUbDe+DYp88V646wwMI= +github.com/buger/jsonparser v0.0.0-20180318095312-2cac668e8456/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +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/fatih/color v0.0.0-20180213133403-507f6050b856 h1:dBR328Qw531483QtEV/73giffukS4fWqLyn2wIt1CyA= +github.com/fatih/color v0.0.0-20180213133403-507f6050b856/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd h1:1e+0Z+T4t1mKL5xxvxXh5FkjuiToQGKreCobLu7lR3Y= +github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= +github.com/gosuri/uilive v0.0.3 h1:kvo6aB3pez9Wbudij8srWo4iY6SFTTxTKOkb+uRCE8I= +github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= +github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce h1:xdsDDbiBDQTKASoGEZ+pEmF1OnWuu8AQ9I8iNbHNeno= +github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/magiconair/properties v0.0.0-20180217134545-2c9e95027885 h1:HWxJJvF+QceKcql4r9PC93NtMEgEBfBxlQrZPvbcQvs= +github.com/magiconair/properties v0.0.0-20180217134545-2c9e95027885/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.0-20180310133214-efa589957cd0 h1:cDvUG90i1ssGJGqMNx2Ubbn+bx7VOzjdvQ45zpy0X4w= +github.com/mattn/go-colorable v0.0.0-20180310133214-efa589957cd0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.0-20171107050531-6ca4dbf54d38 h1:eIoKWEzLDzEb1w9dJWDilISnn03Bzjfbyy5oSuK0Q1E= +github.com/mattn/go-isatty v0.0.0-20171107050531-6ca4dbf54d38/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.0-20180408055351-ce7b0b5c7b45 h1:gEaKFUUdIzJu+JNbGluisX5K1E8MGfe7vkoqR2KH5Mk= +github.com/mattn/go-runewidth v0.0.0-20180408055351-ce7b0b5c7b45/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 h1:/rdJjIiKG5rRdwG5yxHmSE/7ZREjpyC0kL7GxGT/qJw= +github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/olekukonko/tablewriter v0.0.0-20180506121414-d4647c9c7a84 h1:fiKJgB4JDUd43CApkmCeTSQlWjtTtABrU2qsgbuP0BI= +github.com/olekukonko/tablewriter v0.0.0-20180506121414-d4647c9c7a84/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pelletier/go-toml v0.0.0-20180323185243-66540cf1fcd2 h1:BR4UJUSGxC9crpVRG7k28Mq2HRB7lO2A3/ghfWl0R+M= +github.com/pelletier/go-toml v0.0.0-20180323185243-66540cf1fcd2/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.0.0-20180311214515-816c9085562c h1:F5RoIh7F9wB47PvXvpP1+Ihq1TkyC8iRdvwfKkESEZQ= +github.com/pkg/errors v0.0.0-20180311214515-816c9085562c/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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/polyrabbit/token-ticker v0.3.0 h1:bVofYIbG053qVMRgjwAoNmPNJHVGdEncqh3BWLC8LJs= +github.com/polyrabbit/token-ticker v0.3.0/go.mod h1:kWlLHh2DyWKzWhKmys0HirUBN5Vuwn+50xTUNgGlFYw= +github.com/sirupsen/logrus v0.0.0-20180515044140-bde08903c767 h1:fJnpbJk26uSSSSfJZMKP3awEIMTVdZFwHVsbrh7nFsM= +github.com/sirupsen/logrus v0.0.0-20180515044140-bde08903c767/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/spf13/afero v0.0.0-20180401205752-63644898a8da h1:xOGCSnwz3fFyVwFsQ5zVdikAZ6JNM8gePBY+nZmMd80= +github.com/spf13/afero v0.0.0-20180401205752-63644898a8da/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v0.0.0-20180214174949-8965335b8c71 h1:QL8VN7/NqdXNrrrjfcINiS7qa5XuHYQlOnqPCiORy3g= +github.com/spf13/cast v0.0.0-20180214174949-8965335b8c71/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= +github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec h1:2ZXvIUGghLpdTVHR1UfvfrzoVlZaE/yOWC5LueIHZig= +github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20180412120913-583c0c0531f0 h1:ncr4ukAWrL4JaoO3cZPBmyQKD6gtGOnRRa1nL8g5tkk= +github.com/spf13/pflag v0.0.0-20180412120913-583c0c0531f0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v0.0.0-20180319185019-b5e8006cbee9 h1:LeBKqspF2B2rJ4UDr3n36RE1q6f6jxZ2DjMnz6IF1Ho= +github.com/spf13/viper v0.0.0-20180319185019-b5e8006cbee9/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78 h1:uJIReYEB1ZZLarzi83Pmig1HhZ/cwFCysx05l0PFBIk= +golang.org/x/crypto v0.0.0-20180515001509-1a580b3eff78/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +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/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=