From 7f2f800523d34de171512b74b2e2565e841075f1 Mon Sep 17 00:00:00 2001 From: Taylor Sutton Date: Mon, 26 Jul 2021 15:31:58 -0400 Subject: [PATCH 1/2] [automated] Migrate from dep to go mod --- .circleci/config.yml | 7 + Gopkg.lock | 592 ---------------------------------------- Gopkg.toml | 27 -- Makefile | 13 +- gen-go/client/client.go | 16 +- gen-go/client/doer.go | 9 + gen-go/server/router.go | 2 +- gen-js/index.js | 2 +- gen-js/package.json | 2 +- go.mod | 51 ++++ go.sum | 331 ++++++++++++++++++++++ golang.mk | 73 ++--- swagger.yml | 2 +- wag.mk | 9 +- 14 files changed, 445 insertions(+), 691 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.circleci/config.yml b/.circleci/config.yml index d88e82f..2f05835 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,9 +8,11 @@ executors: - image: circleci/postgres:9.4-alpine-ram - image: circleci/mongo:3.2.20-jessie-ram environment: + GOPRIVATE: github.com/Clever/* POSTGRES_USER: postgres environment: + GOPRIVATE: github.com/Clever/* CIRCLE_ARTIFACTS: /tmp/circleci-artifacts CIRCLE_TEST_REPORTS: /tmp/circleci-test-results POSTGRES_USER: postgres @@ -85,6 +87,11 @@ jobs: - run: command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS name: Set up CircleCI artifacts directories + - run: + command: git config --global "url.ssh://git@github.com/Clever".insteadOf "https://github.com/Clever" + - run: + name: Add github.com to known hosts + command: mkdir -p ~/.ssh && touch ~/.ssh/known_hosts && echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts - run: make db-setup - run: make test diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 44161d0..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,592 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:8280a37746523b1140c1b99d3061bcd0a94d74dc131860dd419f7f5a9606fd00" - name = "github.com/Clever/discovery-go" - packages = ["."] - pruneopts = "" - revision = "da13a5b32689e5c3d4ca26db31271fff9315b3e3" - version = "v1.7.2" - -[[projects]] - digest = "1:769619a1bf7a2c991b9c2ec4614d2e5993ca7ee02abb47bb2f0efff8b31e8d8a" - name = "github.com/Clever/go-process-metrics" - packages = ["metrics"] - pruneopts = "" - revision = "d963aeb82c93a543763a1dcb839ccf96be147d97" - version = "v0.2.0" - -[[projects]] - branch = "master" - digest = "1:a36386e1791929528fc7edf26d8b962231267b9d5fa14f7a7a543f20bd6708f2" - name = "github.com/Clever/pq" - packages = [ - ".", - "oid", - ] - pruneopts = "" - revision = "278004c23b92efa6c00c64eb17d3a3be8201e981" - -[[projects]] - digest = "1:860d1669c2397da67801046cb55d1903727b78b3bb9dc45f770f97e574c27ca1" - name = "github.com/Clever/wag" - packages = [ - "swagger", - "templates", - "utils", - ] - pruneopts = "" - revision = "5165e7ff07c5df843a2ccbf33dc9bfe829663f81" - version = "v1.6.1" - -[[projects]] - digest = "1:c0952fb3cf9506cff577b4edf4458889570dcbd2902a7b90a1fd96bfbb97ccd8" - name = "github.com/PuerkitoBio/purell" - packages = ["."] - pruneopts = "" - revision = "44968752391892e1b0d0b821ee79e9a85fa13049" - version = "v1.1.1" - -[[projects]] - branch = "master" - digest = "1:331a419049c2be691e5ba1d24342fc77c7e767a80c666a18fd8a9f7b82419c1c" - name = "github.com/PuerkitoBio/urlesc" - packages = ["."] - pruneopts = "" - revision = "de5bf2ad457846296e2031421a34e2568e304e35" - -[[projects]] - branch = "master" - digest = "1:0ef07197f29c21ea0d5e3d0f686b5c7bed2e2c69cb8b4be6228d83ee9e4ed5ae" - name = "github.com/afex/hystrix-go" - packages = [ - "hystrix", - "hystrix/metric_collector", - "hystrix/rolling", - ] - pruneopts = "" - revision = "fa1af6a1f4f56e0e50d427fe901cd604d8c6fb8a" - -[[projects]] - digest = "1:d5da200a006a54b7e35a0726656ac01b7165cc6fc6bee0cb06f629055de79b55" - name = "github.com/asaskevich/govalidator" - packages = ["."] - pruneopts = "" - revision = "df4adffc9d8ccd584481b637c2a768565bf2c4f1" - version = "v11" - -[[projects]] - digest = "1:0deddd908b6b4b768cfc272c16ee61e7088a60f7fe2f06c547bd3d8e1f8b8e77" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - branch = "master" - digest = "1:917123ed8122468eb815cc418af3bbf298c91f9cb1c36164e063f50e1a726e97" - name = "github.com/donovanhide/eventsource" - packages = ["."] - pruneopts = "" - revision = "3ed64d21fb0b6bd8b49bcfec08f3004daee8723d" - -[[projects]] - digest = "1:f37073c0a3e6f534867278752f514827f4ccc7ee82e8cbba1ee735fc68b90619" - name = "github.com/felixge/httpsnoop" - packages = ["."] - pruneopts = "" - revision = "33ec42cfe005395fb4cc4b296781f65d7ffef2c3" - version = "v1.0.1" - -[[projects]] - digest = "1:b13707423743d41665fd23f0c36b2f37bb49c30e94adb813319c44188a51ba22" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - digest = "1:6620a2846e620b336589751988e2b5907cc80a5ee1f3170eb2423304f996eaeb" - name = "github.com/go-errors/errors" - packages = ["."] - pruneopts = "" - revision = "7c023725d0115f2e05423b2b43a8f85c42f7a6af" - version = "v1.1.1" - -[[projects]] - digest = "1:054826e85cdd63dda4d85a6add6a093c52127b733ea85c836c9461ae5be4e74f" - name = "github.com/go-openapi/analysis" - packages = [ - ".", - "internal", - ] - pruneopts = "" - revision = "421cb960388d1c41b1d4f0eee5300257ac289c97" - version = "v0.19.10" - -[[projects]] - digest = "1:7bdb4db5d49c81d4d82baafcd2d792c90a5fddded585499587b001f709101a57" - name = "github.com/go-openapi/errors" - packages = ["."] - pruneopts = "" - revision = "7f2246786dd6ea01e5e7fe8e0229a53ea48bc6c4" - version = "v0.19.6" - -[[projects]] - digest = "1:47688961daa2895c860642608d671822b7b53fed1e3e3e2d46506f01dcddaae3" - name = "github.com/go-openapi/jsonpointer" - packages = ["."] - pruneopts = "" - revision = "ed123515f087412cd7ef02e49b0b0a5e6a79a360" - version = "v0.19.3" - -[[projects]] - digest = "1:bf297f4800d1a670cf0081091c086bdc3439ce3e3793df9a17be47213818147e" - name = "github.com/go-openapi/jsonreference" - packages = ["."] - pruneopts = "" - revision = "7775307885f903b5e6808c24d81ead7eb136915f" - version = "v0.19.4" - -[[projects]] - digest = "1:a01f55d5e2ea7013fe1077bcb759f5bfa0d8e3be82b362c25b71baac2cc2f39c" - name = "github.com/go-openapi/loads" - packages = ["."] - pruneopts = "" - revision = "18bb1f3437c08e833e5f629003bafc2a3884d19f" - version = "v0.19.5" - -[[projects]] - digest = "1:a917a5d37cd4b44021382fe58bc5527f4accaa1804abb3777ba71c6537ef2109" - name = "github.com/go-openapi/runtime" - packages = ["."] - pruneopts = "" - revision = "1c9920cd23ed5a8a1413138dc62e9f5707a29401" - version = "v0.19.21" - -[[projects]] - digest = "1:4f1411b7c4ab63592cce935c8e59c3b49cf232b4b43fe864e2b3f2de6b269271" - name = "github.com/go-openapi/spec" - packages = ["."] - pruneopts = "" - revision = "e7bc266bd09139be98b222b2ef8fbca0ffdb933d" - version = "v0.19.9" - -[[projects]] - digest = "1:84be9ca34f8749b7427db74c2958548bb532127c1057254e31e199c49dc75856" - name = "github.com/go-openapi/strfmt" - packages = ["."] - pruneopts = "" - revision = "2887e74ed0fe2aea628affe322b19fc3112f98cd" - version = "v0.19.5" - -[[projects]] - digest = "1:7f89974c92a751207c7b0eac0a728dc86f2d1e004c40a18554065d058d21a122" - name = "github.com/go-openapi/swag" - packages = ["."] - pruneopts = "" - revision = "ab98f8e6456407f6afd63e441c5304d6ef60cb7f" - version = "v0.19.9" - -[[projects]] - digest = "1:6a96efe97216f39809df480b5648367fd939c5a3dcb4111350eadc9847f22863" - name = "github.com/go-openapi/validate" - packages = ["."] - pruneopts = "" - revision = "b4358e2166e999e752797fead269fb411dc700f7" - version = "v0.19.10" - -[[projects]] - digest = "1:a01080d20c45c031c13f3828c56e58f4f51d926a482ad10cc0316225097eb7ea" - name = "github.com/go-stack/stack" - packages = ["."] - pruneopts = "" - revision = "2fee6af1a9795aafbe0253a0cfbdf668e1fb8a9a" - version = "v1.8.0" - -[[projects]] - branch = "master" - digest = "1:9759b88a5ee9dd4d1c0ae35d4753cbd23b1e4795e1d6b5b09d010b6055a634b5" - name = "github.com/golang/mock" - packages = [ - "gomock", - "mockgen", - "mockgen/model", - ] - pruneopts = "" - revision = "eb4f98929efdc866a3ffd62c0a05654c5b12004d" - -[[projects]] - digest = "1:9bd66f1a97ec13d279a9d979b315fa4cb17303e71bf89243e70dd096f1be735d" - name = "github.com/gorilla/handlers" - packages = ["."] - pruneopts = "" - revision = "d453effd20e6817a8acfd9d278dadd21371da0ba" - version = "v1.5.1" - -[[projects]] - digest = "1:20e3b61797cba6a42b110320b703a0b86e2771f324411e75557c2acbc819b1b5" - name = "github.com/gorilla/mux" - packages = ["."] - pruneopts = "" - revision = "98cb6bf42e086f6af920b965c38cacc07402d51b" - version = "v1.8.0" - -[[projects]] - digest = "1:8e3bd93036b4a925fe2250d3e4f38f21cadb8ef623561cd80c3c50c114b13201" - name = "github.com/hashicorp/errwrap" - packages = ["."] - pruneopts = "" - revision = "8a6fb523712970c966eefc6b39ed2c5e74880354" - version = "v1.0.0" - -[[projects]] - digest = "1:c6e569ffa34fcd24febd3562bff0520a104d15d1a600199cb3141debf2e58c89" - name = "github.com/hashicorp/go-multierror" - packages = ["."] - pruneopts = "" - revision = "2004d9dba6b07a5b8d133209244f376680f9d472" - version = "v1.1.0" - -[[projects]] - digest = "1:3f2e33d49ad818172242d685bdc1fd6e78b61b4d89d223c873099c245c752828" - name = "github.com/josharian/intern" - packages = ["."] - pruneopts = "" - revision = "8e6ff32b3e7c0b018c43953085fe2ac330fe9acd" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:17a07b60ea50bffc1e8bd84cf4f1e5fcc07f9a5f1c50bbbe3baebc91664fb772" - name = "github.com/jteeuwen/go-bindata" - packages = [ - ".", - "go-bindata", - ] - pruneopts = "" - revision = "6025e8de665b31fa74ab1a66f2cddd8c0abf887e" - -[[projects]] - branch = "master" - digest = "1:e71cc6b377264002aec0d9c235087e51ad7a3c1fb341bb4baa84709308b94fe8" - name = "github.com/kardianos/osext" - packages = ["."] - pruneopts = "" - revision = "2bc1f35cddc0cc527b4bc3dce8578fc2a6c11384" - -[[projects]] - digest = "1:4cf68d6c45d5e78aa9608111e1d8af1aa1f209dd0f74bf3cc50d7780f9fb1a56" - name = "github.com/kevinburke/go-bindata" - packages = [ - ".", - "go-bindata", - ] - pruneopts = "" - revision = "a606d617e1d1546a2342de6fc4ed95c78e171d68" - version = "v3.21.0" - -[[projects]] - digest = "1:6a25763dddfe95941279991cdfbcdf9303b8d76445c44e21313e77b4791a7c14" - name = "github.com/mailru/easyjson" - packages = [ - "buffer", - "jlexer", - "jwriter", - ] - pruneopts = "" - revision = "8ab5ff9cd8e4e432e8b79f6c47d324a31dd803cf" - version = "v0.7.6" - -[[projects]] - digest = "1:8871abddc1a4e30c0356055f65a3909a73b8847ca1e97e286a9ff7f5df8b92a2" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - pruneopts = "" - revision = "9e1e4717f8567d7ead72d070d064ad17d444a67e" - version = "v1.3.3" - -[[projects]] - digest = "1:b0507210d286ef45cac3af88d5be7abbfdda35fc354ee51db1014e33212f182a" - name = "github.com/opentracing/opentracing-go" - packages = [ - ".", - "ext", - "log", - ] - pruneopts = "" - revision = "d34af3eaa63c4d08ab54863a4bdd0daa45212e12" - version = "v1.2.0" - -[[projects]] - digest = "1:c45802472e0c06928cd997661f2af610accd85217023b1d5f6331bebce0671d3" - name = "github.com/pkg/errors" - packages = ["."] - pruneopts = "" - revision = "614d223910a179a466c1767a985424175c39b465" - version = "v0.9.1" - -[[projects]] - digest = "1:256484dbbcd271f9ecebc6795b2df8cad4c458dd0f5fd82a8c2fa0c29f233411" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:83fd2513b9f6ae0997bf646db6b74e9e00131e31002116fda597175f25add42d" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require", - ] - pruneopts = "" - revision = "f654a9112bbeac49ca2cd45bfbe11533c4666cf8" - version = "v1.6.1" - -[[projects]] - digest = "1:53d327353fe718eeb2810f1c43ab71540a35d1b14b28f2c11c18dc0b96b7c41b" - name = "github.com/uber/jaeger-client-go" - packages = [ - ".", - "config", - "internal/baggage", - "internal/baggage/remote", - "internal/reporterstats", - "internal/spanlog", - "internal/throttler", - "internal/throttler/remote", - "log", - "rpcmetrics", - "thrift", - "thrift-gen/agent", - "thrift-gen/baggage", - "thrift-gen/jaeger", - "thrift-gen/sampling", - "thrift-gen/zipkincore", - "transport", - "utils", - ] - pruneopts = "" - revision = "121ee6fb26fd9617fc30d0d95569a39c30ca3b76" - version = "v2.25.0" - -[[projects]] - digest = "1:6afbf06917cb67a1a895aecd38ff31bd691f4fad239e5ce468f2265359bee7b7" - name = "github.com/uber/jaeger-lib" - packages = ["metrics"] - pruneopts = "" - revision = "a87ae9d84fb038a8d79266298970720be7c80fcd" - version = "v2.2.0" - -[[projects]] - branch = "master" - digest = "1:5372ed388f189f6204f1864a2bae1ce9bbdf33f47528ffc776d31a649e3978aa" - name = "github.com/xeipuuv/gojsonpointer" - packages = ["."] - pruneopts = "" - revision = "02993c407bfbf5f6dae44c4f4b1cf6a39b5fc5bb" - -[[projects]] - branch = "master" - digest = "1:604f98a38394d2805a78c462396a4992b93fdd5b7306130add330f1a99ac6b0a" - name = "github.com/xeipuuv/gojsonreference" - packages = ["."] - pruneopts = "" - revision = "bd5ef7bd5415a7ac448318e64f11a24cd21e594b" - -[[projects]] - branch = "master" - digest = "1:225b26e2d1bcccbb48495d411cd38c73a5abd82ead929364b2bc73f1b3172aba" - name = "github.com/xeipuuv/gojsonschema" - packages = ["."] - pruneopts = "" - revision = "065759f9c3d72653843069184bab4f5622926edf" - -[[projects]] - digest = "1:8dee90d6c50c69091530c07f79180b6e7430a4d3c995e0cd5d3e3090d991a6e1" - name = "go.mongodb.org/mongo-driver" - packages = [ - "bson", - "bson/bsoncodec", - "bson/bsonoptions", - "bson/bsonrw", - "bson/bsontype", - "bson/primitive", - "x/bsonx/bsoncore", - ] - pruneopts = "" - revision = "95ed2ee11705a9b1c1e29d05fae34024b7e60ba2" - version = "v1.4.1" - -[[projects]] - digest = "1:31e0d99c1d16170fe209bc535a749da299e1cbe10d8273ab185a4b767786bdd5" - name = "go.uber.org/atomic" - packages = ["."] - pruneopts = "" - revision = "12f27ba2637fa0e13772a4f05fa46a5d18d53182" - version = "v1.7.0" - -[[projects]] - digest = "1:ba49944a3238ae8f163c85b6d01d2db51cd5b09807105a3cfaacbd414744ca82" - name = "golang.org/x/mod" - packages = [ - "internal/lazyregexp", - "modfile", - "module", - "semver", - ] - pruneopts = "" - revision = "859b3ef565e237f9f1a0fb6b55385c497545680d" - version = "v0.3.0" - -[[projects]] - branch = "master" - digest = "1:6328971ba64f6476ca35920ff04f1be7f04c35ce450d0fbe8f65f82c1cd2c6ab" - name = "golang.org/x/net" - packages = [ - "context/ctxhttp", - "idna", - ] - pruneopts = "" - revision = "62affa334b73ec65ed44a326519ac12c421905e3" - -[[projects]] - digest = "1:fccda34e4c58111b1908d8d69bf8d57c41c8e2542bc18ec8cd38c4fa21057f71" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/language", - "internal/language/compact", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - "width", - ] - pruneopts = "" - revision = "23ae387dee1f90d29a23c0e87ee0b46038fbed0e" - version = "v0.3.3" - -[[projects]] - branch = "master" - digest = "1:85a1238a7d9e7a430090e786f8ca952c03104f8af0a1d8d1a5afe6dfa2614cb2" - name = "golang.org/x/tools" - packages = [ - "go/ast/astutil", - "imports", - "internal/event", - "internal/event/core", - "internal/event/keys", - "internal/event/label", - "internal/fastwalk", - "internal/gocommand", - "internal/gopathwalk", - "internal/imports", - ] - pruneopts = "" - revision = "3c2036f9a94dbe2ee517e5101b3a5a51e3302b35" - -[[projects]] - branch = "master" - digest = "1:a5a7a1a9560c0eb1f8b32c40da2e71bd2a05b9ff9e1ea294461c7dbe0d24c6bc" - name = "golang.org/x/xerrors" - packages = [ - ".", - "internal", - ] - pruneopts = "" - revision = "5ec99f83aff198f5fbd629d6c8d8eb38a04218ca" - -[[projects]] - digest = "1:0923ed679d96b9e53b8c43892e2094ebb5dccd0a66709b20c90f43c37ff71ff1" - name = "gopkg.in/Clever/kayvee-go.v6" - packages = [ - ".", - "logger", - "middleware", - "router", - ] - pruneopts = "" - revision = "1c544ce9daf62e3673f4f1ba0bffde53cd13f502" - version = "v6.24.0" - -[[projects]] - branch = "v2" - digest = "1:e56755c5336ff37d20befca76df29097085c85ea1fe58af746e3df6b815decfa" - name = "gopkg.in/mgo.v2" - packages = [ - "bson", - "internal/json", - ] - pruneopts = "" - revision = "a6b53ec6cb22a3699387a57a161566f9402ee85b" - -[[projects]] - branch = "v2" - digest = "1:0963c61acf879ae8b78a659a2864016eb61020c46c93f402041684b80d5963b6" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "" - revision = "b893565b90ca5ebaabd27e535c0e56f97856e5ff" - -[[projects]] - branch = "v3" - digest = "1:2e9c4d6def1d36dcd17730e00c06b49a2e97ea5e1e639bcd24fa60fa43e33ad6" - name = "gopkg.in/yaml.v3" - packages = ["."] - pruneopts = "" - revision = "eeeca48fe7764f320e4870d231902bf9c1be2c08" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/Clever/discovery-go", - "github.com/Clever/go-process-metrics/metrics", - "github.com/Clever/pq", - "github.com/Clever/wag/swagger", - "github.com/afex/hystrix-go/hystrix", - "github.com/donovanhide/eventsource", - "github.com/ghodss/yaml", - "github.com/go-errors/errors", - "github.com/go-openapi/errors", - "github.com/go-openapi/strfmt", - "github.com/go-openapi/swag", - "github.com/go-openapi/validate", - "github.com/golang/mock/gomock", - "github.com/golang/mock/mockgen", - "github.com/gorilla/handlers", - "github.com/gorilla/mux", - "github.com/hashicorp/go-multierror", - "github.com/jteeuwen/go-bindata/go-bindata", - "github.com/kardianos/osext", - "github.com/kevinburke/go-bindata/go-bindata", - "github.com/opentracing/opentracing-go", - "github.com/opentracing/opentracing-go/ext", - "github.com/opentracing/opentracing-go/log", - "github.com/stretchr/testify/assert", - "github.com/stretchr/testify/require", - "github.com/uber/jaeger-client-go", - "github.com/uber/jaeger-client-go/config", - "github.com/uber/jaeger-client-go/transport", - "golang.org/x/net/context/ctxhttp", - "golang.org/x/xerrors", - "gopkg.in/Clever/kayvee-go.v6/logger", - "gopkg.in/Clever/kayvee-go.v6/middleware", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 952d2d9..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,27 +0,0 @@ -required = ["github.com/jteeuwen/go-bindata/go-bindata", "github.com/golang/mock/mockgen"] - -[[constraint]] - name = "github.com/Clever/pq" - -[[constraint]] - name = "github.com/hashicorp/go-multierror" - version = "1.0.0" - -[[constraint]] - name = "github.com/kardianos/osext" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.1.4" - -[[constraint]] - name = "gopkg.in/Clever/kayvee-go.v6" - version = "6.24.0" - -[[constraint]] - branch = "master" - name = "github.com/jteeuwen/go-bindata" - -[[constraint]] - branch = "master" - name = "github.com/golang/mock" diff --git a/Makefile b/Makefile index 5923f7b..e832ba9 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,10 @@ export PATH := $(PWD)/bin:$(PATH) APP_NAME ?= analytics-latency-config-service EXECUTABLE = $(APP_NAME) PKG = github.com/Clever/$(APP_NAME) -PKGS := $(shell go list ./... | grep -v /vendor | grep -v /gen-go | grep -v /tools) +PKGS := $(shell go list ./... | grep -v /vendor | grep -v /gen-go | grep -v /tools | grep -v /tools) -WAG_VERSION := latest +# Temporarily pin to wag 6.4.5 until after migrated to go mod and Go 1.16 +WAG_VERSION := v6.4.5 $(eval $(call golang-version-check,1.13)) @@ -36,10 +37,10 @@ run: build bin/$(EXECUTABLE) generate: wag-generate-deps - $(call wag-generate,./swagger.yml,$(PKG)) + $(call wag-generate-mod,./swagger.yml) go generate ./... -install_deps: golang-dep-vendor-deps - $(call golang-dep-vendor) +install_deps: + go mod vendor go build -o bin/mockgen ./vendor/github.com/golang/mock/mockgen - go build -o bin/go-bindata ./vendor/github.com/jteeuwen/go-bindata/go-bindata + go build -o bin/go-bindata ./vendor/github.com/kevinburke/go-bindata/go-bindata diff --git a/gen-go/client/client.go b/gen-go/client/client.go index 2f7a7f0..c932564 100644 --- a/gen-go/client/client.go +++ b/gen-go/client/client.go @@ -23,7 +23,7 @@ var _ = strconv.FormatInt var _ = bytes.Compare // Version of the client. -const Version = "0.2.2" +const Version = "0.2.3" // VersionHeader is sent with every request. const VersionHeader = "X-Client-Version" @@ -33,7 +33,6 @@ type WagClient struct { basePath string requestDoer doer client *http.Client - timeout time.Duration // Keep the retry doer around so that we can set the number of retries retryDoer *retryDoer // Keep the circuit doer around so that we can turn it on / off @@ -54,7 +53,8 @@ func New(basePath string) *WagClient { retry := retryDoer{d: tracing, retryPolicy: SingleRetryPolicy{}} logger := logger.New("analytics-latency-config-service-wagclient") circuit := &circuitBreakerDoer{ - d: &retry, + d: &retry, + // TODO: INFRANG-4404 allow passing circuitBreakerOptions debug: true, // one circuit for each service + url pair circuitName: fmt.Sprintf("analytics-latency-config-service-%s", shortHash(basePath)), @@ -142,8 +142,8 @@ func (c *WagClient) SetCircuitBreakerSettings(settings CircuitBreakerSettings) { }) } -// SetTimeout sets a timeout on all operations for the client. To make a single request -// with a timeout use context.WithTimeout as described here: https://godoc.org/golang.org/x/net/context#WithTimeout. +// SetTimeout sets a timeout on all operations for the client. To make a single request with a shorter timeout +// than the default on the client, use context.WithTimeout as described here: https://godoc.org/golang.org/x/net/context#WithTimeout. func (c *WagClient) SetTimeout(timeout time.Duration) { c.defaultTimeout = timeout } @@ -240,7 +240,7 @@ func (c *WagClient) doHealthCheckRequest(ctx context.Context, req *http.Request, return &output default: - return &models.InternalError{Message: "Unknown response"} + return &models.InternalError{Message: fmt.Sprintf("Unknown status code %v", resp.StatusCode)} } } @@ -356,7 +356,7 @@ func (c *WagClient) doGetTableLatencyRequest(ctx context.Context, req *http.Requ return nil, &output default: - return nil, &models.InternalError{Message: "Unknown response"} + return nil, &models.InternalError{Message: fmt.Sprintf("Unknown status code %v", resp.StatusCode)} } } @@ -452,7 +452,7 @@ func (c *WagClient) doGetAllLegacyConfigsRequest(ctx context.Context, req *http. return nil, &output default: - return nil, &models.InternalError{Message: "Unknown response"} + return nil, &models.InternalError{Message: fmt.Sprintf("Unknown status code %v", resp.StatusCode)} } } diff --git a/gen-go/client/doer.go b/gen-go/client/doer.go index 2b40f00..8844ccd 100644 --- a/gen-go/client/doer.go +++ b/gen-go/client/doer.go @@ -277,6 +277,15 @@ func (d *circuitBreakerDoer) init() { if e.Type != "HystrixCommand" { continue } + + // Today we are creating a stream for every client so lets only log events for this + // circuit. In an ideal world we only create a single stream and pass it to the client. + // Lets worry about doing this when we implement passing circuitBreakerOptions + // to disable debug mode + if e.Name != d.circuitName { + continue + } + lastSeen, ok := lastEventSeen[e.Name] lastEventSeen[e.Name] = e diff --git a/gen-go/server/router.go b/gen-go/server/router.go index 289d79f..0dacc3b 100644 --- a/gen-go/server/router.go +++ b/gen-go/server/router.go @@ -161,7 +161,7 @@ func (s *Server) Serve() error { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, os.Signal(syscall.SIGTERM)) sig := <-c - s.l.CriticalD("shutdown-initiated", logger.M{"signal": sig.String()}) + s.l.InfoD("shutdown-initiated", logger.M{"signal": sig.String()}) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() defer close(shutdown) diff --git a/gen-js/index.js b/gen-js/index.js index bf1f062..3c3eefc 100644 --- a/gen-js/index.js +++ b/gen-js/index.js @@ -619,7 +619,7 @@ module.exports.Errors = Errors; module.exports.DefaultCircuitOptions = defaultCircuitOptions; -const version = "0.2.2"; +const version = "0.2.3"; const versionHeader = "X-Client-Version"; module.exports.Version = version; module.exports.VersionHeader = versionHeader; diff --git a/gen-js/package.json b/gen-js/package.json index e2e0abf..f6b0c5e 100644 --- a/gen-js/package.json +++ b/gen-js/package.json @@ -1,6 +1,6 @@ { "name": "@clever/analytics-latency-config-service", - "version": "0.2.2", + "version": "0.2.3", "description": "Service for surfacing latency config settings for the analytics pipeline.", "main": "index.js", "dependencies": { diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b93476f --- /dev/null +++ b/go.mod @@ -0,0 +1,51 @@ +module github.com/Clever/analytics-latency-config-service + +go 1.13 + +require ( + github.com/Clever/discovery-go v1.7.2 + github.com/Clever/go-process-metrics v0.2.0 + github.com/Clever/pq v0.0.0-20210406222402-741030d37ece + github.com/Clever/wag v1.6.1 + github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 + github.com/asaskevich/govalidator v0.0.0-20200817114649-df4adffc9d8c // indirect + github.com/codahale/hdrhistogram v0.9.0 // indirect + github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b + github.com/ghodss/yaml v1.0.0 + github.com/go-errors/errors v1.1.1 + github.com/go-openapi/errors v0.19.6 + github.com/go-openapi/runtime v0.19.21 // indirect + github.com/go-openapi/spec v0.19.9 // indirect + github.com/go-openapi/strfmt v0.19.5 + github.com/go-openapi/swag v0.19.9 + github.com/go-openapi/validate v0.19.10 + github.com/golang/mock v1.6.0 + github.com/google/go-cmp v0.5.4 // indirect + github.com/gorilla/handlers v1.5.1 + github.com/gorilla/mux v1.8.0 + github.com/hashicorp/go-multierror v1.1.0 + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 + github.com/kevinburke/go-bindata v3.21.0+incompatible + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mitchellh/mapstructure v1.3.3 // indirect + github.com/opentracing/opentracing-go v1.2.0 + github.com/smartystreets/goconvey v1.6.4 // indirect + github.com/stretchr/testify v1.6.1 + github.com/uber/jaeger-client-go v2.25.0+incompatible + github.com/uber/jaeger-lib v2.2.0+incompatible // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonschema v1.2.1-0.20200424115421-065759f9c3d7 // indirect + go.mongodb.org/mongo-driver v1.4.1 // indirect + go.uber.org/atomic v1.7.0 // indirect + golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 + gopkg.in/Clever/kayvee-go.v6 v6.24.0 + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect + gopkg.in/yaml.v2 v2.3.1-0.20200602174213-b893565b90ca // indirect +) + +exclude ( + github.com/codahale/hdrhistogram v1.0.0 + github.com/codahale/hdrhistogram v1.0.1 + github.com/codahale/hdrhistogram v1.1.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..3d0a338 --- /dev/null +++ b/go.sum @@ -0,0 +1,331 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Clever/discovery-go v1.7.2 h1:sK3PJCz7Q94fDUAncTi4FDUHqMHrAYefPe0x8ZNBDe0= +github.com/Clever/discovery-go v1.7.2/go.mod h1:WC3d6zZHgBarTh3TCktYLy5Bj1Auj5fH86TkP+La71o= +github.com/Clever/go-process-metrics v0.2.0 h1:a4mHTNkH/cnw1MQHDwR8IlJ4MnBXuMY77SYsLeslAYw= +github.com/Clever/go-process-metrics v0.2.0/go.mod h1:Aemel1It05GRZlIfbxbTLl0TwgFaaAALkqfyzuTDk7s= +github.com/Clever/pq v0.0.0-20210406222402-741030d37ece h1:uaHR7nKXYylS0Ptb5aUbmh5T/T4HnwbqDNYqs9IB6QE= +github.com/Clever/pq v0.0.0-20210406222402-741030d37ece/go.mod h1:y0iLP1oF7nbGzy78+hn8ZeqFP1OY3r1jotlyH2xxiBo= +github.com/Clever/wag v1.6.1 h1:sDmqO+7glGYq2mmtfs+pmfPI63Wt2rSGJHQWYLTagns= +github.com/Clever/wag v1.6.1/go.mod h1:TFvKIlyPvxgOGyn36PX9LYRKxjVjmL1Rm3MPzYb5NXU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200817114649-df4adffc9d8c h1:W9P/cRMhwMMfrtInPTAn5rcNu/+vb3zKdGeAd+87tFs= +github.com/asaskevich/govalidator v0.0.0-20200817114649-df4adffc9d8c/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.29.15/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/codahale/hdrhistogram v0.9.0 h1:9GjrtRI+mLEFPtTfR/AZhcxp+Ii8NZYWq5104FbZQY0= +github.com/codahale/hdrhistogram v0.9.0/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b h1:eR1P/A4QMYF2/LpHRhYAts9wyYEtF7qNk/tVNiYCWc8= +github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-errors/errors v1.1.1 h1:ljK/pL5ltg3qoN+OtN6yCv9HWSfMwxSx90GJCZQxYNg= +github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZONuys= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.21 h1:81PiYus9l6fwwS4EwhJD+tQb3EPZBeWfgdAVTfFD25Q= +github.com/go-openapi/runtime v0.19.21/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.9 h1:9z9cbFuZJ7AcvOHKIY+f6Aevb4vObNDkTEyoMfO7rAc= +github.com/go-openapi/spec v0.19.9/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10 h1:tG3SZ5DC5KF4cyt7nqLVcQXGj5A7mpaYkAcNPlDK+Yk= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +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/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kevinburke/go-bindata v3.21.0+incompatible h1:baK7hwFJDlAHrOqmE9U3u8tow1Uc5ihN9E/b7djcK2g= +github.com/kevinburke/go-bindata v3.21.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +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/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +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/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +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/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +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/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= +github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.1-0.20200424115421-065759f9c3d7 h1:tdnG+ZILOafvA29+pYKP3gauEbigHll3PHsf1GQa2ms= +github.com/xeipuuv/gojsonschema v1.2.1-0.20200424115421-065759f9c3d7/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.1 h1:38NSAyDPagwnFpUA/D5SFgbugUYR3NzYRNa4Qk9UxKs= +go.mongodb.org/mongo-driver v1.4.1/go.mod h1:llVBH2pkj9HywK0Dtdt6lDikOjFLbceHVu/Rc0iMKLs= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/Clever/kayvee-go.v6 v6.24.0 h1:xOpO9c3by6CqnbWpdhzwsK+mEpNk7HKceHpVvoWFudU= +gopkg.in/Clever/kayvee-go.v6 v6.24.0/go.mod h1:G0m6nBZj7Kdz+w2hiIaawmhXl5zp7E/K0ashol3Kb2A= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.1-0.20200602174213-b893565b90ca h1:oivFrl3Vo+KfpUmTDJvz91I+BWzDPOQ+0CNR5jwTHcg= +gopkg.in/yaml.v2 v2.3.1-0.20200602174213-b893565b90ca/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/golang.mk b/golang.mk index 63f8ab4..18e211c 100644 --- a/golang.mk +++ b/golang.mk @@ -1,15 +1,18 @@ # This is the default Clever Golang Makefile. # It is stored in the dev-handbook repo, github.com/Clever/dev-handbook # Please do not alter this file directly. -GOLANG_MK_VERSION := 0.4.1 +GOLANG_MK_VERSION := 1.0.0 SHELL := /bin/bash SYSTEM := $(shell uname -a | cut -d" " -f1 | tr '[:upper:]' '[:lower:]') -.PHONY: golang-test-deps bin/dep golang-ensure-curl-installed +.PHONY: golang-test-deps golang-ensure-curl-installed # set timezone to UTC for golang to match circle and deploys export TZ=UTC +# go build flags for use across all commands which accept them +GO_BUILD_FLAGS := "-mod=vendor" + # if the gopath includes several directories, use only the first GOPATH=$(shell echo $$GOPATH | cut -d: -f1) @@ -32,57 +35,21 @@ _ := $(if \ endef # FGT is a utility that exits with 1 whenever any stderr/stdout output is recieved. +# We pin its version since its a simple tool that does its job as-is; +# so we're defended against it breaking or changing in the future. FGT := $(GOPATH)/bin/fgt $(FGT): - go get github.com/GeertJohan/fgt + go get github.com/GeertJohan/fgt@262f7b11eec07dc7b147c44641236f3212fee89d golang-ensure-curl-installed: @command -v curl >/dev/null 2>&1 || { echo >&2 "curl not installed. Please install curl."; exit 1; } -DEP_VERSION = v0.5.4 -DEP_INSTALLED := $(shell [[ -e "bin/dep" ]] && bin/dep version | grep version | grep -v go | cut -d: -f2 | tr -d '[:space:]') -# Dep is a tool used to manage Golang dependencies. It is the offical vendoring experiment, but -# not yet the official tool for Golang. -ifeq ($(DEP_VERSION),$(DEP_INSTALLED)) -bin/dep: # nothing to do, dep is already up-to-date -else -CACHED_DEP = /tmp/dep-$(DEP_VERSION) -bin/dep: golang-ensure-curl-installed - @echo "Updating dep..." - @mkdir -p bin - @if [ ! -f $(CACHED_DEP) ]; then curl -o $(CACHED_DEP) -sL https://github.com/golang/dep/releases/download/$(DEP_VERSION)/dep-$(SYSTEM)-amd64; fi; - @cp $(CACHED_DEP) bin/dep - @chmod +x bin/dep || true -endif - -# figure out "github.com//" -# `go list` will fail if there are no .go files in the directory -# if this is the case, fall back to assuming github.com/Clever -REF = $(shell go list || echo github.com/Clever/$(notdir $(shell pwd))) -golang-verify-no-self-references: - @if grep -q -i "$(REF)" Gopkg.lock; then echo "Error: Gopkg.lock includes a self-reference ($(REF)), which is not allowed. See: https://github.com/golang/dep/issues/1690" && exit 1; fi; - @if grep -q -i "$(REF)" Gopkg.toml; then echo "Error: Gopkg.toml includes a self-reference ($(REF)), which is not allowed. See: https://github.com/golang/dep/issues/1690" && exit 1; fi; - -golang-dep-vendor-deps: bin/dep golang-verify-no-self-references - -# golang-godep-vendor is a target for saving dependencies with the dep tool -# to the vendor/ directory. All nested vendor/ directories are deleted via -# the prune command. -# In CI, -vendor-only is used to avoid updating the lock file. -ifndef CI -define golang-dep-vendor -bin/dep ensure -v -endef -else -define golang-dep-vendor -bin/dep ensure -v -vendor-only -endef -endif - # Golint is a tool for linting Golang code for common errors. +# We pin its version because an update could add a new lint check which would make +# previously passing tests start failing without changing our code. GOLINT := $(GOPATH)/bin/golint $(GOLINT): - go get golang.org/x/lint/golint + go get golang.org/x/lint/golint@738671d3881b9731cc63024d5d88cf28db875626 # golang-fmt-deps requires the FGT tool for checking output golang-fmt-deps: $(FGT) @@ -91,7 +58,7 @@ golang-fmt-deps: $(FGT) # arg1: pkg path define golang-fmt @echo "FORMATTING $(1)..." -@$(FGT) gofmt -l=true $(GOPATH)/src/$(1)/*.go +@PKG_PATH=$$(go list -f '{{.Dir}}' $(1)); $(FGT) gofmt -l=true $${PKG_PATH}/*.go endef # golang-lint-deps requires the golint tool for golang linting. @@ -101,7 +68,7 @@ golang-lint-deps: $(GOLINT) # arg1: pkg path define golang-lint @echo "LINTING $(1)..." -@find $(GOPATH)/src/$(1)/*.go -type f | grep -v gen_ | xargs $(GOLINT) +@PKG_PATH=$$(go list -f '{{.Dir}}' $(1)); find $${PKG_PATH}/*.go -type f | grep -v gen_ | xargs $(GOLINT) endef # golang-lint-deps-strict requires the golint tool for golang linting. @@ -112,7 +79,7 @@ golang-lint-deps-strict: $(GOLINT) $(FGT) # arg1: pkg path define golang-lint-strict @echo "LINTING $(1)..." -@find $(GOPATH)/src/$(1)/*.go -type f | grep -v gen_ | xargs $(FGT) $(GOLINT) +@PKG_PATH=$$(go list -f '{{.Dir}}' $(1)); find $${PKG_PATH}/*.go -type f | grep -v gen_ | xargs $(FGT) $(GOLINT) endef # golang-test-deps is here for consistency @@ -122,7 +89,7 @@ golang-test-deps: # arg1: pkg path define golang-test @echo "TESTING $(1)..." -@go test -v $(1) +@go test $(GO_BUILD_FLAGS) -v $(1) endef # golang-test-strict-deps is here for consistency @@ -132,7 +99,7 @@ golang-test-strict-deps: # arg1: pkg path define golang-test-strict @echo "TESTING $(1)..." -@go test -v -race $(1) +@go test -v $(GO_BUILD_FLAGS) -race $(1) endef # golang-vet-deps is here for consistency @@ -142,7 +109,7 @@ golang-vet-deps: # arg1: pkg path define golang-vet @echo "VETTING $(1)..." -@go vet $(GOPATH)/src/$(1)/*.go +@go vet $(GO_BUILD_FLAGS) $(1) endef # golang-test-all-deps installs all dependencies needed for different test cases. @@ -176,14 +143,14 @@ endef define golang-build @echo "BUILDING..." @if [ -z "$$CI" ]; then \ - go build -o bin/$(2) $(1); \ + go build $(GO_BUILD_FLAGS) -o bin/$(2) $(1); \ else \ echo "-> Building CGO binary"; \ - CGO_ENABLED=0 go build -installsuffix cgo -o bin/$(2) $(1); \ + CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -installsuffix cgo -o bin/$(2) $(1); \ fi; endef # golang-update-makefile downloads latest version of golang.mk golang-update-makefile: - @wget https://raw.githubusercontent.com/Clever/dev-handbook/master/make/golang.mk -O /tmp/golang.mk 2>/dev/null + @wget https://raw.githubusercontent.com/Clever/dev-handbook/master/make/golang-v1.mk -O /tmp/golang.mk 2>/dev/null @if ! grep -q $(GOLANG_MK_VERSION) /tmp/golang.mk; then cp /tmp/golang.mk golang.mk && echo "golang.mk updated"; else echo "golang.mk is up-to-date"; fi diff --git a/swagger.yml b/swagger.yml index 1963213..6253fc5 100644 --- a/swagger.yml +++ b/swagger.yml @@ -4,7 +4,7 @@ info: description: Service for surfacing latency config settings for the analytics pipeline. # when changing the version here, make sure to run # `make generate` to generate clients and server - version: 0.2.2 + version: 0.2.3 x-npm-package: '@clever/analytics-latency-config-service' schemes: - http diff --git a/wag.mk b/wag.mk index b52dff2..fb8e406 100644 --- a/wag.mk +++ b/wag.mk @@ -1,6 +1,6 @@ # This is the default Clever Wag Makefile. # Please do not alter this file directly. -WAG_MK_VERSION := 0.4.2 +WAG_MK_VERSION := 0.4.3 SHELL := /bin/bash SYSTEM := $(shell uname -a | cut -d" " -f1 | tr '[:upper:]' '[:lower:]') WAG_INSTALLED := $(shell [[ -e "bin/wag" ]] && bin/wag --version) @@ -36,6 +36,13 @@ bin/wag -go-package $(2)/gen-go -js-path ./gen-js -file $(1) (cd ./gen-js && ../node_modules/.bin/jsdoc2md index.js types.js > ./README.md) endef +# wag-generate-mod is a target for generating code from a swagger.yml using wag for modules repos +# arg1: path to swagger.yml +define wag-generate-mod +bin/wag -output-path gen-go -js-path ./gen-js -file $(1) +(cd ./gen-js && ../node_modules/.bin/jsdoc2md index.js types.js > ./README.md) +endef + wag-update-makefile: @wget https://raw.githubusercontent.com/Clever/dev-handbook/master/make/wag.mk -O /tmp/wag.mk 2>/dev/null @if ! grep -q $(WAG_MK_VERSION) /tmp/wag.mk; then cp /tmp/wag.mk wag.mk && echo "wag.mk updated"; else echo "wag.mk is up-to-date"; fi From 605dd3e59d8f29155d5b0bee9a62d32fbb69683d Mon Sep 17 00:00:00 2001 From: Taylor Sutton Date: Mon, 26 Jul 2021 16:08:50 -0400 Subject: [PATCH 2/2] No go-generate lines: remove gen from Makefile --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index e832ba9..e35a71b 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,6 @@ run: build generate: wag-generate-deps $(call wag-generate-mod,./swagger.yml) - go generate ./... install_deps: go mod vendor