From dc104dd17bf5f5ac494065848452bfabd03d946c Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 25 Dec 2018 15:45:11 -0500 Subject: [PATCH] switch to go modules, drop testing against go master --- .travis.yml | 36 +--- Gopkg.lock | 466 ------------------------------------------------- Gopkg.toml | 47 ----- Makefile | 12 +- cmd/version.go | 2 +- go.mod | 50 ++++++ go.sum | 90 ++++++++++ 7 files changed, 153 insertions(+), 550 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.travis.yml b/.travis.yml index 4069cba..42ec25a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,30 +2,16 @@ os: linux dist: trusty language: go -# Only the last two Go releases are supported by the Go team with security -# updates. Any versions older than that should be considered deprecated. -# Don't bother testing with them. tip builds your code with the latest -# development version of Go. This can warn you that your code will break -# in the next version of Go. Don't worry! Later we declare that test runs -# are allowed to fail on Go tip. -matrix: - include: - - go: 1.10.2 - env: DEPLOY=true # dont deploy tip build - - go: master - env: DEPLOY=false # dont deploy tip build - allow_failures: - - go: master - # Don't wait for tip tests to finish. Mark the test run green if the - # tests pass on the stable versions of Go. - fast_finish: true +env: + - GO111MODULE=on + +go: + - 1.11.x -# Don't email me the results of the test runs. notifications: email: false -# Skip the install step. Don't `go get` dependencies. Only build with the -# code in vendor/ +# Skip the install step. Don't `go get` dependencies. Only build with the code in vendor/ install: true # Anything in before_script that returns a nonzero exit code will @@ -48,8 +34,6 @@ before_script: # script always run to completion (set +e). All of these code checks are must haves # in a modern Go project. script: - # install deps - - make dep # Fail if a .go file hasn't been formatted with gofmt - test -z $(gofmt -s -l $GO_FILES) # Run unit tests @@ -62,11 +46,11 @@ script: # forbid code with huge functions #- gocyclo -ignore "_test.go" -avg -over 19 $GO_FILES # checks for unhandled errors - - errcheck ./... + # - errcheck ./... # COMMENTED OUT UNTIL https://github.com/kisielk/errcheck/issues/155 is fixed # "go vet on steroids" + linter - ignore autogen code - - megacheck -simple.exit-non-zero=true ./... + # - megacheck -simple.exit-non-zero=true ./... # DISABLED UNTIL https://github.com/dominikh/go-tools/issues/328 is fixed # check for unnecessary conversions - ignore autogen code - - unconvert ./... + # - unconvert ./... # SEEMS TO BE BROKEN WITH GO MODULES # one last linter - ignore autogen code #- golint -set_exit_status $(go list ./... | grep -v /vendor/ ) # Finally, build the binary @@ -79,7 +63,6 @@ deploy: on: repo: lbryio/reflector.go tags: true - condition: "$DEPLOY = true" api_key: secure: epAlhp3SUr8hhISarJ22n6tRw2TEa4s4oNFIvJUb5HGECVp1SYN7ao0ln5NoNLmfJS60pi911i/kMhhi21/uhZ0kCYlEhhIE2pc1zsiAxK9L9ENCssJ205HfVbe5grhwskLGzgjhU9OznO8WtmyOPWXr0it8M8RCTjx6rEC0A33Id3WMYyhP938Sj9CxEYeH4KS8wFvBXkgBVtrgaYwRTCIROFddHFXOb9jyNhqQ1RbfKtllsVtQhVk5WMlomheBNSS4vr6WMS4X4+2okFqnLtiSn1wrn5I/94UQbnrI1juVnQj0K+j32EyQbAOt4T2cLW3GtG0jhaYKyNMT9ycDCdVACPSDELlHWjeyoes9bnhUFftm6kDbQxwA1UsTF1yG8tMKXxBSmYyoT7qDloi6pBifZMrFXL61uTs6yhVB9LS/2oqg4sc0Ne87bRcn4OxsBeVCe3kbBHDTR/NTyF2gNPtRvgMAWULxTVcUm9VYdO0IWvAig5g4Row0DnFzEquD6CzezbRWD9WyZyV/AFyYHeeQ2PO7jTw0/3M7aDX33Fuhh34lehzmrC03cfgD/wZW+spxozIcQCYdiJqVw+u+/NvbNr0kkFzE9zW26JEmUFTyDvKxvnza1Kwtww3EgH6zaOL8r4yVbb54rePRvLw7pl93zlfJnEB2MCPqJOY5ZpU= - provider: s3 @@ -87,7 +70,6 @@ deploy: skip_cleanup: true on: repo: lbryio/reflector.go - condition: "$DEPLOY = true" access_key_id: secure: "ABmoSTxTee1GubJmmi+MlyBcnqRT0ywEOtTL4hrH7T+Vj5UPcNBhjqGRiMXzO3MdrVWom19OnqMvsvAdehrB4uQJVlX/+zB26gTpEiiU5dWJgerNAYmfxDGNz/p9pyYWLvVY/cymSlJ4HkggJVg+dMTBTOP+gTNgQUhHL7pAd/Z5HMPmPW/rlNlQgDdczoY44OdiniuHny4Lr7mo8dcT4dcyJysPpHLCPGWp3kXcffIEbgO02aQZ14BbX9oU9xm1BacYnr4t8gRCU+uK0mt7TREHUzZ8bQBRXUymmpeeEQshXdifdwtk6sdRGIZiTi0NmQ7kYter6oh6623TH6rpNy/lkxKi823FbSPC1XZGH7CwcbnSIEwY++7e9PT0EA14VuDUF7+iXC/gpRkVQwUoMcoC9rHBjkXW+SiwHWoUeDKXrfVO9QGEJTi5bDRNwklwu2zkYWeRIPzfDaVayUBYwjunjT1eST997ygmJwJTJ6DeOWLx+WFlmwBJfQpBwbrlMrceiNjreMwGB6ffXEBzuM6S5inXGIChllGDpNyJeFVcH9zPpU0JsIpWoRjwLNFOiEhFsnzK5rvA2SKmlOOnSlgOCBQnFi2SmLDM790KoY8qjan2s984chQz2qsKnhYuVpJhG6LKgrI1QwE0KHr80spVFfewq11AU4Q+lfA9aAQ=" secret_access_key: diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index acfaccb..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,466 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - digest = "1:354e62d5acb9af138e13ec842f78a846d214a8d4a9f80e578698f1f1565e2ef8" - name = "github.com/armon/go-metrics" - packages = ["."] - pruneopts = "" - revision = "3c58d8115a78a6879e5df75ae900846768d36895" - -[[projects]] - branch = "master" - digest = "1:b1b9627af19ee54d3ed6b069375f0e91baa4a25267cf3b684e80fdefb17f4719" - name = "github.com/aws/aws-sdk-go" - packages = [ - "aws", - "aws/awserr", - "aws/awsutil", - "aws/client", - "aws/client/metadata", - "aws/corehandlers", - "aws/credentials", - "aws/credentials/ec2rolecreds", - "aws/credentials/endpointcreds", - "aws/credentials/stscreds", - "aws/csm", - "aws/defaults", - "aws/ec2metadata", - "aws/endpoints", - "aws/request", - "aws/session", - "aws/signer/v4", - "internal/sdkio", - "internal/sdkrand", - "internal/sdkuri", - "internal/shareddefaults", - "private/protocol", - "private/protocol/eventstream", - "private/protocol/eventstream/eventstreamapi", - "private/protocol/query", - "private/protocol/query/queryutil", - "private/protocol/rest", - "private/protocol/restxml", - "private/protocol/xml/xmlutil", - "service/s3", - "service/s3/s3iface", - "service/s3/s3manager", - "service/sts", - ] - pruneopts = "" - revision = "c0447dbaaf195bb477fd2d511b8e4665e04b9017" - -[[projects]] - branch = "master" - digest = "1:56b87c786a316d6e9b9c7ba8f3dd64e3199ca3b33a55cc596c633023bed20264" - name = "github.com/btcsuite/btcutil" - packages = ["base58"] - pruneopts = "" - revision = "ab6388e0c60ae4834a1f57511e20c17b5f78be4b" - -[[projects]] - digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "" - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - digest = "1:968d8903d598e3fae738325d3410f33f07ea6a2b9ee5591e9c262ee37df6845a" - name = "github.com/go-errors/errors" - packages = ["."] - pruneopts = "" - revision = "a6af135bd4e28680facf08a3d206b454abc877a4" - version = "v1.0.1" - -[[projects]] - digest = "1:858b7fe7b0f4bc7ef9953926828f2816ea52d01a88d72d1c45bc8c108f23c356" - name = "github.com/go-ini/ini" - packages = ["."] - pruneopts = "" - revision = "358ee7663966325963d4e8b2e1fbd570c5195153" - version = "v1.38.1" - -[[projects]] - branch = "master" - digest = "1:7150b23ba935d63f7b930d6c5ff20b52649ba623d62e0344971c822615fe57a3" - name = "github.com/go-sql-driver/mysql" - packages = ["."] - pruneopts = "" - revision = "99ff426eb706cffe92ff3d058e168b278cabf7c7" - -[[projects]] - digest = "1:3dd078fda7500c341bc26cfbc6c6a34614f295a2457149fc1045cab767cbcf18" - name = "github.com/golang/protobuf" - packages = ["proto"] - pruneopts = "" - revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" - version = "v1.2.0" - -[[projects]] - digest = "1:dbbeb8ddb0be949954c8157ee8439c2adfd8dc1c9510eb44a6e58cb68c3dce28" - name = "github.com/gorilla/context" - packages = ["."] - pruneopts = "" - revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" - version = "v1.1.1" - -[[projects]] - digest = "1:c2c8666b4836c81a1d247bdf21c6a6fc1ab586538ab56f74437c2e0df5c375e1" - name = "github.com/gorilla/mux" - packages = ["."] - pruneopts = "" - revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf" - version = "v1.6.2" - -[[projects]] - digest = "1:91aaeb45b3c10cc9cb68d1450cbc8ac77d0a677cf34a8ed3d4ef4dacb9df8a50" - name = "github.com/gorilla/rpc" - packages = [ - "v2", - "v2/json", - ] - pruneopts = "" - revision = "22c016f3df3febe0c1f6727598b6389507e03a18" - version = "v1.1.0" - -[[projects]] - digest = "1:64d212c703a2b94054be0ce470303286b177ad260b2f89a307e3d1bb6c073ef6" - name = "github.com/gorilla/websocket" - packages = ["."] - pruneopts = "" - revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b" - version = "v1.2.0" - -[[projects]] - branch = "master" - digest = "1:4fe55793760295fbef367890352b720784243e0ad19b5ee242519a4682bb9ef8" - name = "github.com/hashicorp/errwrap" - packages = ["."] - pruneopts = "" - revision = "d6c0cd88035724dd42e0f335ae30161c20575ecc" - -[[projects]] - branch = "master" - digest = "1:4423ee95d6ee30bb22f680445c58889bb5b91e1b955405bf34374a053784a8a2" - name = "github.com/hashicorp/go-immutable-radix" - packages = ["."] - pruneopts = "" - revision = "7f3cd4390caab3250a57f30efdb2a65dd7649ecf" - -[[projects]] - branch = "master" - digest = "1:6396690228a7560bf9247cb90e5ae9c797bd630b01e7d2acab430bbca9a1ecb3" - name = "github.com/hashicorp/go-msgpack" - packages = ["codec"] - pruneopts = "" - revision = "fa3f63826f7c23912c15263591e65d54d080b458" - -[[projects]] - branch = "master" - digest = "1:0b5ca7d18e4ded1e4dacbb37ff027cb40a80c0fed969e4e03cf7aff129bc1b44" - name = "github.com/hashicorp/go-multierror" - packages = ["."] - pruneopts = "" - revision = "3d5d8f294aa03d8e98859feac328afbdf1ae0703" - -[[projects]] - branch = "master" - digest = "1:fd8ec2359315965bb6b84fd8e45cd5e8b58b80d8430dc96c8c5dfce46d30dbfc" - name = "github.com/hashicorp/go-sockaddr" - packages = ["."] - pruneopts = "" - revision = "6d291a969b86c4b633730bfc6b8b9d64c3aafed9" - -[[projects]] - branch = "master" - digest = "1:9c776d7d9c54b7ed89f119e449983c3f24c0023e75001d6092442412ebca6b94" - name = "github.com/hashicorp/golang-lru" - packages = ["simplelru"] - pruneopts = "" - revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3" - -[[projects]] - digest = "1:d2c45a353b65012162c7ca22c39b1b0bd06d39362fb375cf42b4e48e1104bfc6" - name = "github.com/hashicorp/memberlist" - packages = ["."] - pruneopts = "" - revision = "ce8abaa0c60c2d6bee7219f5ddf500e0a1457b28" - version = "v0.1.0" - -[[projects]] - branch = "master" - digest = "1:7b8e4a60bfdacc2a79ba4a4ef21b2e86e98fb1dc99d816179e0b4aee75106051" - name = "github.com/hashicorp/serf" - packages = [ - "coordinate", - "serf", - ] - pruneopts = "" - revision = "984a73625de3138f44deb38d00878fab39eb6447" - -[[projects]] - branch = "master" - digest = "1:32c49a8cbcb20989c4fc0825f792cb1ea079af601c11b5ed0a92a48433171db3" - name = "github.com/inconshreveable/go-update" - packages = [ - ".", - "internal/binarydist", - "internal/osext", - ] - pruneopts = "" - revision = "8152e7eb6ccf8679a64582a66b78519688d156ad" - -[[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" - name = "github.com/inconshreveable/mousetrap" - packages = ["."] - pruneopts = "" - revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - version = "v1.0" - -[[projects]] - digest = "1:6f49eae0c1e5dab1dafafee34b207aeb7a42303105960944828c2079b92fc88e" - name = "github.com/jmespath/go-jmespath" - packages = ["."] - pruneopts = "" - revision = "0b12d6b5" - -[[projects]] - branch = "master" - digest = "1:1e4cb5c6d4e92e2fb34f1545e071fb61e81c71fc0c325445db19b9f3981cb343" - name = "github.com/johntdyer/slack-go" - packages = ["."] - pruneopts = "" - revision = "95fac1160b220c5abcf8b0ef88e9c3cb213c09f4" - -[[projects]] - branch = "master" - digest = "1:7abe0d83ffb4c20fce461c314b1dc858cba274580cf1508f698b5f9fd9e1cde9" - name = "github.com/johntdyer/slackrus" - packages = ["."] - pruneopts = "" - revision = "f7aae3243a0786c5a974bce71ed951c459876e64" - -[[projects]] - branch = "master" - digest = "1:65bb92382468ce7a1ee218b5f352cd0927d358569be7521dd7cb42e74589a308" - name = "github.com/lbryio/errors.go" - packages = ["."] - pruneopts = "" - revision = "ad03d3cc6a5c27c94bbe3412cf7de0eae1a9bd7c" - -[[projects]] - branch = "master" - digest = "1:3e990fec1701f7cd3a301cb0fa824f65e35a37c224ff17f4d842720651d2f2fb" - name = "github.com/lbryio/lbry.go" - packages = [ - "crypto", - "errors", - "null", - "querytools", - "stop", - "util", - ] - pruneopts = "" - revision = "e2c96944fc485d3ab5e164da78f8439a94c5aa85" - -[[projects]] - branch = "master" - digest = "1:dbd7fd543a88da4f81fbb849175b400d69b04f1f82de34c8c2efdc5626b80999" - name = "github.com/lbryio/types" - packages = ["go"] - pruneopts = "" - revision = "0a913ba650dd7d72e2a008b86dac117be3d5f075" - -[[projects]] - branch = "master" - digest = "1:cabf2bf5e49edfe0c34cb9c6a256f2a99e6cc8c5e660855c8f3dafe1f81d5dcd" - name = "github.com/lyoshenka/bencode" - packages = ["."] - pruneopts = "" - revision = "b7abd7672df533e627eddbf3a5a529786e8bda7f" - -[[projects]] - digest = "1:4c8d8358c45ba11ab7bb15df749d4df8664ff1582daead28bae58cf8cbe49890" - name = "github.com/miekg/dns" - packages = ["."] - pruneopts = "" - revision = "5a2b9fab83ff0f8bfc99684bd5f43a37abe560f1" - version = "v1.0.8" - -[[projects]] - digest = "1:e6352ff4bd34c601567ad5e274837275f08e2a933e2688354cf5d44595c13ef9" - name = "github.com/nlopes/slack" - packages = ["."] - pruneopts = "" - revision = "0db1d5eae1116bf7c8ed96c6749acfbf4daaec3e" - version = "v0.3.0" - -[[projects]] - branch = "master" - digest = "1:d38c630298ac75e214f3caa5c240ea2923c7a089824d175ba4107d0650d56579" - name = "github.com/phayes/freeport" - packages = ["."] - pruneopts = "" - revision = "e27662a4a9d6b2083dfd7e7b5d0e30985daca925" - -[[projects]] - branch = "master" - digest = "1:6ee36f2cea425916d81fdaaf983469fc18f91b3cf090cfe90fa0a9d85b8bfab7" - name = "github.com/sean-/seed" - packages = ["."] - pruneopts = "" - revision = "e2103e2c35297fb7e17febb81e49b312087a2372" - -[[projects]] - branch = "master" - digest = "1:65d0c541c450f6f8bb9654a3f1938407a835bf41faade00bb0fa1416de215d00" - name = "github.com/sebdah/goldie" - packages = ["."] - pruneopts = "" - revision = "8784dd1ab561dcf43d141f6678e9e41f3d0dff55" - -[[projects]] - branch = "master" - digest = "1:56de39853758a4b6053a3f71e527305bbed11a0d876156e32e8cc7180d36198b" - name = "github.com/sirupsen/logrus" - packages = ["."] - pruneopts = "" - revision = "d329d24db4313262a3b0a24d8aeb1dc4bd294fb0" - -[[projects]] - digest = "1:d0b38ba6da419a6d4380700218eeec8623841d44a856bb57369c172fbf692ab4" - name = "github.com/spf13/cast" - packages = ["."] - pruneopts = "" - revision = "8965335b8c7107321228e3e3702cab9832751bac" - version = "v1.2.0" - -[[projects]] - branch = "master" - digest = "1:c8f6919ab9f140506fd4ad3f4a9c9c2af9ee7921e190af0c67b2fca2f903083c" - name = "github.com/spf13/cobra" - packages = ["."] - pruneopts = "" - revision = "7c4570c3ebeb8129a1f7456d0908a8b676b6f9f1" - -[[projects]] - digest = "1:8e243c568f36b09031ec18dff5f7d2769dcf5ca4d624ea511c8e3197dc3d352d" - name = "github.com/spf13/pflag" - packages = ["."] - pruneopts = "" - revision = "583c0c0531f06d5278b7d917446061adc344b5cd" - version = "v1.0.1" - -[[projects]] - branch = "master" - digest = "1:b7ef38166f9ee44c54ef992b2754950f73fa09daf30355bea7aa510f224c38a6" - name = "github.com/uber-go/atomic" - packages = ["."] - pruneopts = "" - revision = "ca680462431f8c7f96686d91b1d9e5203c4b075b" - -[[projects]] - branch = "master" - digest = "1:53c4b75f22ea7757dea07eae380ea42de547ae6865a5e3b41866754a8a8219c9" - name = "golang.org/x/crypto" - packages = [ - "ed25519", - "ed25519/internal/edwards25519", - "ripemd160", - "sha3", - "ssh/terminal", - ] - pruneopts = "" - revision = "f027049dab0ad238e394a753dba2d14753473a04" - -[[projects]] - branch = "master" - digest = "1:9f170ebb5ac75debb7e958e0388545441cc77de4d131a0c170530e948f3e857e" - name = "golang.org/x/net" - packages = [ - "bpf", - "context", - "internal/iana", - "internal/socket", - "ipv4", - "ipv6", - ] - pruneopts = "" - revision = "19491d39cadbd9cd33f26ca22cc89ba4ba38251c" - -[[projects]] - branch = "master" - digest = "1:309d0f514b3f0dd143089ff4ab91c894d3e3f7e771c89b59d4b015b955cbaa5c" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - ] - pruneopts = "" - revision = "0718ef2ef256118d53a01598f179001ec2af7626" - -[[projects]] - branch = "master" - digest = "1:55a681cb66f28755765fa5fa5104cbd8dc85c55c02d206f9f89566451e3fe1aa" - name = "golang.org/x/time" - packages = ["rate"] - pruneopts = "" - revision = "fbb02b2291d28baffd63558aa44b4b56f178d650" - -[[projects]] - digest = "1:c1771ca6060335f9768dff6558108bc5ef6c58506821ad43377ee23ff059e472" - name = "google.golang.org/appengine" - packages = ["cloudsql"] - pruneopts = "" - revision = "b1f26356af11148e710935ed1ac8a7f5702c7612" - version = "v1.1.0" - -[[projects]] - digest = "1:f771bf87a3253de520c2af6fb6e75314dce0fedc0b30b208134fe502932bb15d" - name = "gopkg.in/nullbio/null.v6" - packages = ["convert"] - pruneopts = "" - revision = "40264a2e6b7972d183906cf17663983c23231c82" - version = "v6.3" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/aws/aws-sdk-go/aws", - "github.com/aws/aws-sdk-go/aws/awserr", - "github.com/aws/aws-sdk-go/aws/credentials", - "github.com/aws/aws-sdk-go/aws/session", - "github.com/aws/aws-sdk-go/service/s3", - "github.com/aws/aws-sdk-go/service/s3/s3manager", - "github.com/davecgh/go-spew/spew", - "github.com/go-sql-driver/mysql", - "github.com/golang/protobuf/proto", - "github.com/gorilla/mux", - "github.com/gorilla/rpc/v2", - "github.com/gorilla/rpc/v2/json", - "github.com/hashicorp/serf/serf", - "github.com/inconshreveable/go-update", - "github.com/johntdyer/slackrus", - "github.com/lbryio/errors.go", - "github.com/lbryio/lbry.go/crypto", - "github.com/lbryio/lbry.go/errors", - "github.com/lbryio/lbry.go/querytools", - "github.com/lbryio/lbry.go/stop", - "github.com/lbryio/lbry.go/util", - "github.com/lbryio/types/go", - "github.com/lyoshenka/bencode", - "github.com/phayes/freeport", - "github.com/sebdah/goldie", - "github.com/sirupsen/logrus", - "github.com/spf13/cast", - "github.com/spf13/cobra", - "github.com/uber-go/atomic", - "golang.org/x/time/rate", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index e065e37..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,47 +0,0 @@ -[[constraint]] - name = "github.com/aws/aws-sdk-go" - branch = "master" - -[[constraint]] - name = "github.com/go-sql-driver/mysql" - branch = "master" - -[[constraint]] - name = "github.com/hashicorp/serf" - branch = "master" - -[[constraint]] - name = "github.com/lbryio/lbry.go" - branch = "master" - -[[constraint]] - name = "github.com/sirupsen/logrus" - branch = "master" - -[[constraint]] - name = "github.com/spf13/cobra" - branch = "master" - -[[constraint]] - branch = "master" - name = "github.com/lyoshenka/bencode" - -[[constraint]] - branch = "master" - name = "github.com/uber-go/atomic" - -[[constraint]] - branch = "master" - name = "github.com/phayes/freeport" - -[[constraint]] - branch = "master" - name = "github.com/johntdyer/slackrus" - -[[constraint]] - branch = "master" - name = "github.com/inconshreveable/go-update" - -[[constraint]] - branch = "master" - name = "github.com/lbryio/types" diff --git a/Makefile b/Makefile index 9b2a44b..f22e160 100644 --- a/Makefile +++ b/Makefile @@ -2,27 +2,21 @@ BINARY=prism-bin DIR = $(shell cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) BIN_DIR = ${DIR}/bin -VENDOR_DIR = vendor IMPORT_PATH = github.com/lbryio/reflector.go VERSION = $(shell git --git-dir=${DIR}/.git describe --dirty --always --long --abbrev=7) LDFLAGS = -ldflags "-X ${IMPORT_PATH}/meta.Version=${VERSION} -X ${IMPORT_PATH}/meta.Time=$(shell date +%s)" -.PHONY: build dep clean test lint +.PHONY: build clean test lint .DEFAULT_GOAL: build -build: dep +build: mkdir -p ${BIN_DIR} && CGO_ENABLED=0 go build ${LDFLAGS} -asmflags -trimpath=${DIR} -o ${BIN_DIR}/${BINARY} main.go -dep: | $(VENDOR_DIR) - -$(VENDOR_DIR): - go get github.com/golang/dep/cmd/dep && dep ensure - clean: - if [ -f ${DIR}/${BINARY} ]; then rm ${DIR}/${BINARY}; fi + if [ -f ${BIN_DIR}/${BINARY} ]; then rm ${BIN_DIR}/${BINARY}; fi test: go test ./... -v -cover diff --git a/cmd/version.go b/cmd/version.go index 03b9d51..d3675bb 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -18,5 +18,5 @@ func init() { } func versionCmd(cmd *cobra.Command, args []string) { - fmt.Printf("version %s (%s)\n", meta.Version, meta.BuildTime.Format(time.RFC3339)) + fmt.Printf("version %s (built at %s)\n", meta.Version, meta.BuildTime.Format(time.RFC3339)) } diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5fa3d10 --- /dev/null +++ b/go.mod @@ -0,0 +1,50 @@ +module github.com/lbryio/reflector.go + +require ( + github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78 + github.com/aws/aws-sdk-go v0.0.0-20180806205706-c0447dbaaf19 + github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a + github.com/davecgh/go-spew v1.1.0 + github.com/go-errors/errors v1.0.1 + github.com/go-ini/ini v1.38.1 + github.com/go-sql-driver/mysql v0.0.0-20180719071942-99ff426eb706 + github.com/golang/protobuf v1.2.0 + github.com/gorilla/context v1.1.1 + github.com/gorilla/mux v1.6.2 + github.com/gorilla/rpc v1.1.0 + github.com/gorilla/websocket v1.2.0 + github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 + github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa + github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c + github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0 + github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 + github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 + github.com/hashicorp/memberlist v0.1.0 + github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3 + github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf + github.com/inconshreveable/mousetrap v1.0.0 + github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 + github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22 + github.com/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07 + github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c + github.com/lbryio/lbry.go v0.0.0-20180803110248-e2c96944fc48 + github.com/lbryio/types v0.0.0-20171215152337-0a913ba650dd + github.com/lyoshenka/bencode v0.0.0-20180323155644-b7abd7672df5 + github.com/miekg/dns v1.0.8 + github.com/nlopes/slack v0.3.0 + github.com/phayes/freeport v0.0.0-20171002185219-e27662a4a9d6 + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 + github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561 + github.com/sergi/go-diff v1.0.0 + github.com/sirupsen/logrus v0.0.0-20180731161355-d329d24db431 + github.com/spf13/cast v1.2.0 + github.com/spf13/cobra v0.0.0-20180722215644-7c4570c3ebeb + github.com/spf13/pflag v1.0.1 + github.com/uber-go/atomic v0.0.0-20180806045314-ca680462431f + golang.org/x/crypto v0.0.0-20180807104621-f027049dab0a + golang.org/x/net v0.0.0-20180807145015-19491d39cadb + golang.org/x/sys v0.0.0-20180807141123-0718ef2ef256 + golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 + google.golang.org/appengine v1.1.0 + gopkg.in/nullbio/null.v6 v6.0.0-20161116030900-40264a2e6b79 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..10639fd --- /dev/null +++ b/go.sum @@ -0,0 +1,90 @@ +github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78 h1:mdRSArcFLfW0VoL34LZAKSz6LkkK4jFxVx2xYavACMg= +github.com/armon/go-metrics v0.0.0-20180713145231-3c58d8115a78/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/aws/aws-sdk-go v0.0.0-20180806205706-c0447dbaaf19 h1:2di6C9H5QJ+D5LPazymJz8s2kRd8YkbN7knV17yH1Yw= +github.com/aws/aws-sdk-go v0.0.0-20180806205706-c0447dbaaf19/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-ini/ini v1.38.1 h1:hbtfM8emWUVo9GnXSloXYyFbXxZ+tG6sbepSStoe1FY= +github.com/go-ini/ini v1.38.1/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-sql-driver/mysql v0.0.0-20180719071942-99ff426eb706 h1:P3NPKb7qq581SeMCB+dU1SuCX1kQh8VoQ/4HmT2ftQY= +github.com/go-sql-driver/mysql v0.0.0-20180719071942-99ff426eb706/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +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/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/rpc v1.1.0 h1:marKfvVP0Gpd/jHlVBKCQ8RAoUPdX7K1Nuh6l1BNh7A= +github.com/gorilla/rpc v1.1.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= +github.com/gorilla/websocket v1.2.0 h1:VJtLvh6VQym50czpZzx07z/kw9EgAxI3x1ZB8taTMQQ= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 h1:Rem2+U35z1QtPQc6r+WolF7yXiefXqDKyk+lN2pE164= +github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa h1:0nA8i+6Rwqaq9xlpmVxxTwk6rxiEhX+E6Wh4vPNHiS8= +github.com/hashicorp/go-immutable-radix v0.0.0-20180129170900-7f3cd4390caa/go.mod h1:6ij3Z20p+OhOkCSrA0gImAWoHYQRGbnlcuk6XYTiaRw= +github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c h1:BTAbnbegUIMB6xmQCwWE8yRzbA4XSpnZY5hvRJC188I= +github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0 h1:j30noezaCfvNLcdMYSvHLv81DxYRSt1grlpseG67vhU= +github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM= +github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47 h1:UnszMmmmm5vLwWzDjTFVIkfhvWF1NdrmChl8L2NUDCw= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8= +github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= +github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3 h1:NUr1hG6WO9sI1x8ofSimmpqfJ+rEHiHP/PLEA33rcfQ= +github.com/hashicorp/serf v0.0.0-20180530155958-984a73625de3/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= +github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf h1:WfD7VjIE6z8dIvMsI4/s+1qr5EL+zoIGev1BQj1eoJ8= +github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22 h1:jKUP9TQ0c7X3w6+IPyMit07RE42MtTWNd77sN2cHngQ= +github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22/go.mod h1:u0Jo4f2dNlTJeeOywkM6bLwxq6gC3pZ9rEFHn3AhTdk= +github.com/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07 h1:+kBG/8rjCa6vxJZbUjAiE4MQmBEBYc8nLEb51frnvBY= +github.com/johntdyer/slackrus v0.0.0-20180518184837-f7aae3243a07/go.mod h1:j1kV/8f3jowErEq4XyeypkCdvg5EeHkf0YCKCcq5Ybo= +github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c h1:BhdcWGsuKif/XoSZnqVGNqJ1iEmH0czWR5upj+AuR8M= +github.com/lbryio/errors.go v0.0.0-20180223142025-ad03d3cc6a5c/go.mod h1:muH7wpUqE8hRA3OrYYosw9+Sl681BF9cwcjzE+OCNK8= +github.com/lbryio/lbry.go v0.0.0-20180803110248-e2c96944fc48 h1:ojUrZuL8vqHxyhivNdpjDaIBkjzWktS9FOTTFkVG8yU= +github.com/lbryio/lbry.go v0.0.0-20180803110248-e2c96944fc48/go.mod h1:jyMyYNmA1t7GTkgYs6z2kMnDFTFzlGBr+IkG9LXHk9M= +github.com/lbryio/types v0.0.0-20171215152337-0a913ba650dd h1:5wQgwcaLqLMaFIPju2QHcCseSHlArxpQZ1szEGzrp6Y= +github.com/lbryio/types v0.0.0-20171215152337-0a913ba650dd/go.mod h1:CG3wsDv5BiVYQd5i1Jp7wGsaVyjZTJshqXeWMVKsISE= +github.com/lyoshenka/bencode v0.0.0-20180323155644-b7abd7672df5 h1:mG83tLXWSRdcXMWfkoumVwhcCbf3jHF9QKv/m37BkM0= +github.com/lyoshenka/bencode v0.0.0-20180323155644-b7abd7672df5/go.mod h1:H0aPCWffGOaDcjkw1iB7W9DVLp6GXmfcJY/7YZCWPA4= +github.com/miekg/dns v1.0.8 h1:Zi8HNpze3NeRWH1PQV6O71YcvJRQ6j0lORO6DAEmAAI= +github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/nlopes/slack v0.3.0 h1:jCxvaS8wC4Bb1jnbqZMjCDkOOgy4spvQWcrw/TF0L0E= +github.com/nlopes/slack v0.3.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= +github.com/phayes/freeport v0.0.0-20171002185219-e27662a4a9d6 h1:2bae6N0SZjgzk+Zg8mzTsfmpwHXY9VBNp9UdjhaElA0= +github.com/phayes/freeport v0.0.0-20171002185219-e27662a4a9d6/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561 h1:IY+sDBJR/wRtsxq+626xJnt4Tw7/ROA9cDIR8MMhWyg= +github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561/go.mod h1:lvjGftC8oe7XPtyrOidaMi0rp5B9+XY/ZRUynGnuaxQ= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v0.0.0-20180731161355-d329d24db431 h1:tJ2phHULXperiIq6Cl3t4MLypicinjmlM3Y+lNEipuo= +github.com/sirupsen/logrus v0.0.0-20180731161355-d329d24db431/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg= +github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= +github.com/spf13/cobra v0.0.0-20180722215644-7c4570c3ebeb h1:9EsYJzSlhhaP+nYmMOcptMF2VEUH52jxPzt/TX14KWM= +github.com/spf13/cobra v0.0.0-20180722215644-7c4570c3ebeb/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/uber-go/atomic v0.0.0-20180806045314-ca680462431f h1:vKpCeeburRE8ZXnuj9ptRqjm7WLD0O7ug28tRJuWM54= +github.com/uber-go/atomic v0.0.0-20180806045314-ca680462431f/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +golang.org/x/crypto v0.0.0-20180807104621-f027049dab0a h1:PulT0Y50PcfTWomfsD39bSQyVrjjWdIuJKfyR4nOCJw= +golang.org/x/crypto v0.0.0-20180807104621-f027049dab0a/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20180807145015-19491d39cadb h1:H5qWxL6CeEdaEGPqB5nnxJja1ULIcpuu91vIqAuGoJ0= +golang.org/x/net v0.0.0-20180807145015-19491d39cadb/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sys v0.0.0-20180807141123-0718ef2ef256 h1:tKa4dTsBBeG8RnHO9sDPtJYNJNOc4ilC49ePrvii4To= +golang.org/x/sys v0.0.0-20180807141123-0718ef2ef256/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +gopkg.in/nullbio/null.v6 v6.0.0-20161116030900-40264a2e6b79 h1:FpCr9V8wuOei4BAen+93HtVJ+XSi+KPbaPKm0Vj5R64= +gopkg.in/nullbio/null.v6 v6.0.0-20161116030900-40264a2e6b79/go.mod h1:gWkaRU7CoXpezCBWfWjm3999QqS+1pYPXGbqQCTMzo8=