From 3d173a115474d6f79c48a1547ba19aaf9330c3dc Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 14 Oct 2019 11:02:40 +0200 Subject: [PATCH] Convert to go modules, update for github case insensitivity breakages --- .gitmodules | 30 ------------- cmd/gots-dump/main.go | 2 +- cmd/gots-stamp/main.go | 2 +- cmd/gots-upgrade/main.go | 2 +- cmd/gots-verify/main.go | 6 +-- go.mod | 10 +++++ go.sum | 58 +++++++++++++++++++++++++ opentimestamps/client/bitcoin.go | 4 +- opentimestamps/client/bitcoin_test.go | 4 +- opentimestamps/remote_calendar.go | 2 +- opentimestamps/remote_calendar_test.go | 2 +- vendor/github.com/btcsuite/btcd | 1 - vendor/github.com/btcsuite/btclog | 1 - vendor/github.com/btcsuite/btcrpcclient | 1 - vendor/github.com/btcsuite/btcutil | 1 - vendor/github.com/btcsuite/go-socks | 1 - vendor/github.com/btcsuite/golangcrypto | 1 - vendor/github.com/btcsuite/seelog | 1 - vendor/github.com/btcsuite/websocket | 1 - vendor/github.com/stretchr/testify | 1 - vendor/golang.org/x/crypto | 1 - 21 files changed, 80 insertions(+), 52 deletions(-) delete mode 100644 .gitmodules create mode 100644 go.mod create mode 100644 go.sum delete mode 160000 vendor/github.com/btcsuite/btcd delete mode 160000 vendor/github.com/btcsuite/btclog delete mode 160000 vendor/github.com/btcsuite/btcrpcclient delete mode 160000 vendor/github.com/btcsuite/btcutil delete mode 160000 vendor/github.com/btcsuite/go-socks delete mode 160000 vendor/github.com/btcsuite/golangcrypto delete mode 160000 vendor/github.com/btcsuite/seelog delete mode 160000 vendor/github.com/btcsuite/websocket delete mode 160000 vendor/github.com/stretchr/testify delete mode 160000 vendor/golang.org/x/crypto diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e92e0e6..0000000 --- a/.gitmodules +++ /dev/null @@ -1,30 +0,0 @@ -[submodule "vendor/github.com/stretchr/testify"] - path = vendor/github.com/stretchr/testify - url = https://github.com/stretchr/testify -[submodule "vendor/golang.org/x/crypto"] - path = vendor/golang.org/x/crypto - url = https://go.googlesource.com/crypto -[submodule "vendor/github.com/btcsuite/btcrpcclient"] - path = vendor/github.com/btcsuite/btcrpcclient - url = https://github.com/btcsuite/btcrpcclient -[submodule "vendor/github.com/btcsuite/btcd"] - path = vendor/github.com/btcsuite/btcd - url = https://github.com/btcsuite/btcd -[submodule "vendor/github.com/btcsuite/btclog"] - path = vendor/github.com/btcsuite/btclog - url = https://github.com/btcsuite/btclog -[submodule "vendor/github.com/btcsuite/seelog"] - path = vendor/github.com/btcsuite/seelog - url = https://github.com/btcsuite/seelog -[submodule "vendor/github.com/btcsuite/btcutil"] - path = vendor/github.com/btcsuite/btcutil - url = https://github.com/btcsuite/btcutil -[submodule "vendor/github.com/btcsuite/golangcrypto"] - path = vendor/github.com/btcsuite/golangcrypto - url = https://github.com/btcsuite/golangcrypto -[submodule "vendor/github.com/btcsuite/go-socks"] - path = vendor/github.com/btcsuite/go-socks - url = https://github.com/btcsuite/go-socks -[submodule "vendor/github.com/btcsuite/websocket"] - path = vendor/github.com/btcsuite/websocket - url = https://github.com/btcsuite/websocket diff --git a/cmd/gots-dump/main.go b/cmd/gots-dump/main.go index 60a84b4..0392215 100644 --- a/cmd/gots-dump/main.go +++ b/cmd/gots-dump/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" ) func main() { diff --git a/cmd/gots-stamp/main.go b/cmd/gots-stamp/main.go index 674f11c..8c855a9 100644 --- a/cmd/gots-stamp/main.go +++ b/cmd/gots-stamp/main.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" ) const defaultCalendar = "https://alice.btc.calendar.opentimestamps.org" diff --git a/cmd/gots-upgrade/main.go b/cmd/gots-upgrade/main.go index 711a55a..ac673c4 100644 --- a/cmd/gots-upgrade/main.go +++ b/cmd/gots-upgrade/main.go @@ -6,7 +6,7 @@ import ( "log" "os" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" ) func main() { diff --git a/cmd/gots-verify/main.go b/cmd/gots-verify/main.go index e0a5aa5..bb12b29 100644 --- a/cmd/gots-verify/main.go +++ b/cmd/gots-verify/main.go @@ -5,9 +5,9 @@ import ( "fmt" "log" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps/client" - "github.com/btcsuite/btcrpcclient" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" + "github.com/blockchainsource/go-opentimestamps/opentimestamps/client" + btcrpcclient "github.com/btcsuite/btcd/rpcclient" ) func newBtcConn(host, user, pass string) (*btcrpcclient.Client, error) { diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..0a4eed6 --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module github.com/blockchainsource/go-opentimestamps + +go 1.12 + +require ( + github.com/btcsuite/btcd v0.0.0-20191011231409-07282a6656b8 + github.com/sirupsen/logrus v1.4.2 + github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..9477769 --- /dev/null +++ b/go.sum @@ -0,0 +1,58 @@ +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/btcsuite/btcd v0.0.0-20191011231409-07282a6656b8 h1:VtBbiBsPRCedNPZELoycBnfoMcpSPnc5ktPh+ORniJw= +github.com/btcsuite/btcd v0.0.0-20191011231409-07282a6656b8/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +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/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/opentimestamps/client/bitcoin.go b/opentimestamps/client/bitcoin.go index 7323109..93ea56f 100644 --- a/opentimestamps/client/bitcoin.go +++ b/opentimestamps/client/bitcoin.go @@ -5,8 +5,8 @@ import ( "math" "time" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" - "github.com/btcsuite/btcrpcclient" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" + btcrpcclient "github.com/btcsuite/btcd/rpcclient" ) // A BitcoinAttestationVerifier uses a bitcoin RPC connection to verify bitcoin diff --git a/opentimestamps/client/bitcoin_test.go b/opentimestamps/client/bitcoin_test.go index 4c5d9fd..17db706 100644 --- a/opentimestamps/client/bitcoin_test.go +++ b/opentimestamps/client/bitcoin_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/BlockchainSource/go-opentimestamps/opentimestamps" - "github.com/btcsuite/btcrpcclient" + "github.com/blockchainsource/go-opentimestamps/opentimestamps" + btcrpcclient "github.com/btcsuite/btcd/rpcclient" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/opentimestamps/remote_calendar.go b/opentimestamps/remote_calendar.go index d78dd89..7d5347a 100644 --- a/opentimestamps/remote_calendar.go +++ b/opentimestamps/remote_calendar.go @@ -9,7 +9,7 @@ import ( "net/http/httputil" "strings" - "github.com/Sirupsen/logrus" + "github.com/sirupsen/logrus" ) const userAgent = "go-opentimestamps" diff --git a/opentimestamps/remote_calendar_test.go b/opentimestamps/remote_calendar_test.go index 0dc7b8b..7f4126d 100644 --- a/opentimestamps/remote_calendar_test.go +++ b/opentimestamps/remote_calendar_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/Sirupsen/logrus" + "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/vendor/github.com/btcsuite/btcd b/vendor/github.com/btcsuite/btcd deleted file mode 160000 index 583684b..0000000 --- a/vendor/github.com/btcsuite/btcd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 583684b21bfbde9b5fc4403916fd7c807feb0289 diff --git a/vendor/github.com/btcsuite/btclog b/vendor/github.com/btcsuite/btclog deleted file mode 160000 index 73889fb..0000000 --- a/vendor/github.com/btcsuite/btclog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73889fb79bd687870312b6e40effcecffbd57d30 diff --git a/vendor/github.com/btcsuite/btcrpcclient b/vendor/github.com/btcsuite/btcrpcclient deleted file mode 160000 index eef3939..0000000 --- a/vendor/github.com/btcsuite/btcrpcclient +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eef39394b7eb639be140973f8f2dcc2020784f5f diff --git a/vendor/github.com/btcsuite/btcutil b/vendor/github.com/btcsuite/btcutil deleted file mode 160000 index 86346b5..0000000 --- a/vendor/github.com/btcsuite/btcutil +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 86346b5a958c0cf94186b87855469ae991be501c diff --git a/vendor/github.com/btcsuite/go-socks b/vendor/github.com/btcsuite/go-socks deleted file mode 160000 index 4720035..0000000 --- a/vendor/github.com/btcsuite/go-socks +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4720035b7bfd2a9bb130b1c184f8bbe41b6f0d0f diff --git a/vendor/github.com/btcsuite/golangcrypto b/vendor/github.com/btcsuite/golangcrypto deleted file mode 160000 index 53f62d9..0000000 --- a/vendor/github.com/btcsuite/golangcrypto +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 53f62d9b43e87a6c56975cf862af7edf33a8d0df diff --git a/vendor/github.com/btcsuite/seelog b/vendor/github.com/btcsuite/seelog deleted file mode 160000 index 313961b..0000000 --- a/vendor/github.com/btcsuite/seelog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 313961b101eb55f65ae0f03ddd4e322731763b6c diff --git a/vendor/github.com/btcsuite/websocket b/vendor/github.com/btcsuite/websocket deleted file mode 160000 index 31079b6..0000000 --- a/vendor/github.com/btcsuite/websocket +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31079b6807923eb23992c421b114992b95131b55 diff --git a/vendor/github.com/stretchr/testify b/vendor/github.com/stretchr/testify deleted file mode 160000 index 4d4bfba..0000000 --- a/vendor/github.com/stretchr/testify +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4d4bfba8f1d1027c4fdbe371823030df51419987 diff --git a/vendor/golang.org/x/crypto b/vendor/golang.org/x/crypto deleted file mode 160000 index 459e265..0000000 --- a/vendor/golang.org/x/crypto +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 459e26527287adbc2adcc5d0d49abff9a5f315a7