From 8c2cceddb84f53aee22d17010c5fcf161c687a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20G=2E=20MARAND?= Date: Mon, 13 Sep 2021 16:07:31 +0200 Subject: [PATCH 1/2] Update vagrant.sh Upgrade to Go 1.17.1 --- scripts/vagrant.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vagrant.sh b/scripts/vagrant.sh index c31369f..39fe5a5 100644 --- a/scripts/vagrant.sh +++ b/scripts/vagrant.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e -wget -q https://storage.googleapis.com/golang/go1.9.4.linux-amd64.tar.gz -tar -C /usr/local -xzf go1.9.4.linux-amd64.tar.gz +wget -q https://storage.googleapis.com/golang/go1.17.1.linux-amd64.tar.gz +tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz apt-get update apt-get -y install git mercurial apache2-utils From a8b9bc0bfa7d8b28c25ac790fd9a71a8846b525b Mon Sep 17 00:00:00 2001 From: "Frederic G. MARAND" Date: Mon, 13 Sep 2021 16:48:22 +0200 Subject: [PATCH 2/2] Issue #119: convert to Go 1.17. --- .gitignore | 1 + Vagrantfile | 2 +- go.mod | 19 +++++++++++++++++++ go.sum | 39 +++++++++++++++++++++++++++++++++++++++ scripts/vagrant.sh | 13 +++++++------ 5 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitignore b/.gitignore index 8000dd9..c713642 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +.idea .vagrant diff --git a/Vagrantfile b/Vagrantfile index 5c0a555..d476a02 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ Vagrant.configure("2") do |config| - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/focal64" config.vm.hostname = 'hystrix-go.local' config.vm.provision :shell, :path => "scripts/vagrant.sh" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b596ded --- /dev/null +++ b/go.mod @@ -0,0 +1,19 @@ +module github.com/afex/hystrix-go + +go 1.17 + +require ( + github.com/DataDog/datadog-go v4.8.2+incompatible + github.com/cactus/go-statsd-client v2.0.2+incompatible + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 + github.com/smartystreets/goconvey v1.6.4 +) + +require ( + github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect + github.com/jtolds/gls v4.20.0+incompatible // indirect + github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect + github.com/stretchr/testify v1.7.0 // indirect + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..7085e21 --- /dev/null +++ b/go.sum @@ -0,0 +1,39 @@ +github.com/DataDog/datadog-go v4.8.2+incompatible h1:qbcKSx29aBLD+5QLvlQZlGmRMF/FfGqFLFev/1TDzRo= +github.com/DataDog/datadog-go v4.8.2+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/cactus/go-statsd-client v2.0.2+incompatible h1:fq6u7pZGQh45DMCKGzLPL4VUY6YOpQbySJE6yLsIedk= +github.com/cactus/go-statsd-client v2.0.2+incompatible/go.mod h1:cMRcwZDklk7hXp+Law83urTHUiHMzCev/r4JMYr/zU0= +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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/pkg/errors v0.9.1/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/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/scripts/vagrant.sh b/scripts/vagrant.sh index 39fe5a5..a57c0b3 100644 --- a/scripts/vagrant.sh +++ b/scripts/vagrant.sh @@ -5,19 +5,20 @@ wget -q https://storage.googleapis.com/golang/go1.17.1.linux-amd64.tar.gz tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz apt-get update -apt-get -y install git mercurial apache2-utils +apt-get -y install git mercurial apache2-utils gcc # GCC needed for CGO dependencies +apt-get upgrade -y echo 'export PATH=$PATH:/usr/local/go/bin:/go/bin export GOPATH=/go' >> /home/vagrant/.profile source /home/vagrant/.profile -go get golang.org/x/tools/cmd/goimports -go get github.com/golang/lint/golint +go install golang.org/x/tools/cmd/goimports@latest +go install golang.org/x/lint/golint@latest go get github.com/smartystreets/goconvey/convey -go get github.com/cactus/go-statsd-client/statsd -go get github.com/rcrowley/go-metrics -go get github.com/DataDog/datadog-go/statsd +go get github.com/cactus/go-statsd-client/statsd@v2 +go get github.com/rcrowley/go-metrics@latest +go get github.com/DataDog/datadog-go/statsd@latest chown -R vagrant:vagrant /go