diff --git a/.travis.yml b/.travis.yml index 78d1349..eceb57f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.9.x + - 1.11.x script: - 'make cover-remote' diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 7acfc5d..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,168 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:fca365d239707c0319526eeb71b75250ede0eaa26c86d8dba78b9720ed965f84" - name = "github.com/Travix-International/go-metrics" - packages = ["."] - pruneopts = "" - revision = "fa7d888fbe15b2585786b027f1f6a30e8d9dab81" - version = "v1.5.1" - -[[projects]] - digest = "1:fe59a9eb04a7200658e3f40074cd0ba68e8bf39bc7769c05b8d1cffa9d0b55aa" - name = "github.com/Travix-International/logger" - packages = ["."] - pruneopts = "" - revision = "509996f71acd7c13931daff8f104ef1552694df9" - version = "v0.6.0" - -[[projects]] - branch = "master" - digest = "1:0c5485088ce274fac2e931c1b979f2619345097b39d91af3239977114adf0320" - name = "github.com/beorn7/perks" - packages = ["quantile"] - pruneopts = "" - revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" - -[[projects]] - digest = "1:56c130d885a4aacae1dd9c7b71cfe39912c7ebc1ff7d2b46083c8812996dc43b" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "" - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:3b760d3b93f994df8eb1d9ebfad17d3e9e37edcb7f7efaa15b427c0d7a64f4e4" - name = "github.com/golang/protobuf" - packages = ["proto"] - pruneopts = "" - revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845" - -[[projects]] - digest = "1:3c818dada3e41bdb0f509f78e6775610f1bb179449ec8c4c86a45fae35460f3f" - name = "github.com/julienschmidt/httprouter" - packages = ["."] - pruneopts = "" - revision = "8c199fb6259ffc1af525cc3ad52ee60ba8359669" - version = "v1.1" - -[[projects]] - digest = "1:4c23ced97a470b17d9ffd788310502a077b9c1f60221a85563e49696276b4147" - name = "github.com/matttproud/golang_protobuf_extensions" - packages = ["pbutil"] - pruneopts = "" - revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" - version = "v1.0.0" - -[[projects]] - digest = "1:7365acd48986e205ccb8652cc746f09c8b7876030d53710ea6ef7d0bd0dcd7ca" - name = "github.com/pkg/errors" - packages = ["."] - pruneopts = "" - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - digest = "1:256484dbbcd271f9ecebc6795b2df8cad4c458dd0f5fd82a8c2fa0c29f233411" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:4142d94383572e74b42352273652c62afec5b23f325222ed09198f46009022d1" - name = "github.com/prometheus/client_golang" - packages = [ - "prometheus", - "prometheus/promhttp", - ] - pruneopts = "" - revision = "c5b7fccd204277076155f10851dad72b76a49317" - version = "v0.8.0" - -[[projects]] - branch = "master" - digest = "1:60aca47f4eeeb972f1b9da7e7db51dee15ff6c59f7b401c1588b8e6771ba15ef" - name = "github.com/prometheus/client_model" - packages = ["go"] - pruneopts = "" - revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c" - -[[projects]] - branch = "master" - digest = "1:e3aa5178be4fc4ae8cdb37d11c02f7490c00450a9f419e6aa84d02d3b47e90d2" - name = "github.com/prometheus/common" - packages = [ - "expfmt", - "internal/bitbucket.org/ww/goautoneg", - "model", - ] - pruneopts = "" - revision = "2e54d0b93cba2fd133edc32211dcc32c06ef72ca" - -[[projects]] - branch = "master" - digest = "1:d094102bd188af955ab3a94cf78d10fae623f4c6d13bebe0b336ca6a1b2b58a3" - name = "github.com/prometheus/procfs" - packages = [ - ".", - "xfs", - ] - pruneopts = "" - revision = "f98634e408857669d61064b283c4cde240622865" - -[[projects]] - digest = "1:bfc8db90e2676a2fc0d742a536f376044a9b74f2745b2c60d339eb06c6c6988a" - name = "github.com/rs/cors" - packages = ["."] - pruneopts = "" - revision = "7af7a1e09ba336d2ea14b1ce73bf693c6837dbf6" - version = "v1.2" - -[[projects]] - branch = "master" - digest = "1:ed7ac53c7d59041f27964d3f04e021b45ecb5f23c842c84d778a7f1fb67e2ce9" - name = "github.com/stretchr/objx" - packages = ["."] - pruneopts = "" - revision = "1a9d0bb9f541897e62256577b352fdbc1fb4fd94" - -[[projects]] - digest = "1:3926a4ec9a4ff1a072458451aa2d9b98acd059a45b38f7335d31e06c3d6a0159" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "mock", - ] - pruneopts = "" - revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" - version = "v1.1.4" - -[[projects]] - branch = "master" - digest = "1:a9afbcb2b5dacde3889b77124be6abe68477a09c6da3df224cc74f5e180454e6" - name = "golang.org/x/net" - packages = ["context"] - pruneopts = "" - revision = "d866cfc389cec985d6fda2859936a575a55a3ab6" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/Travix-International/go-metrics", - "github.com/Travix-International/logger", - "github.com/julienschmidt/httprouter", - "github.com/pkg/errors", - "github.com/prometheus/client_golang/prometheus/promhttp", - "github.com/rs/cors", - "github.com/stretchr/testify/assert", - "github.com/stretchr/testify/mock", - "golang.org/x/net/context", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 81d5318..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,50 +0,0 @@ - -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" - - -[[constraint]] - name = "github.com/Travix-International/go-metrics" - version = "v1.5.1" - -[[constraint]] - name = "github.com/Travix-International/logger" - version = "0.6.0" - -[[constraint]] - name = "github.com/julienschmidt/httprouter" - version = "1.1.0" - -[[constraint]] - name = "github.com/prometheus/client_golang" - version = "0.8.0" - -[[constraint]] - name = "github.com/rs/cors" - version = "1.2.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.1.4" - -[[constraint]] - branch = "master" - name = "golang.org/x/net" diff --git a/Makefile b/Makefile index 092dfa7..6b0fac3 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,20 @@ COVERALLS_TOKEN := "IVQwNa8dypGgtaLmBkFSoBcRcCl0tlqui" GITHUB_API_TOKEN := "" VERSION :="" -APP_NAME := "servicefoundation" -SERVER_NAME := "servicefoundation-1234" -DEPLOY_ENVIRONMENT := "staging" + +export GO111MODULE=on +export APP_NAME=servicefoundation +export SERVER_NAME=servicefoundation-1234 +export DEPLOY_ENVIRONMENT=staging cover-remote: go get -u golang.org/x/lint/golint go get -u github.com/mattn/goveralls - go get -u github.com/golang/dep/cmd/dep - dep ensure go test -covermode=count -coverprofile=cover.tmp goveralls -service travis-ci -coverprofile cover.tmp run-tests: - go get -u github.com/golang/dep/cmd/dep - dep ensure - go test -cover `go list ./... | grep -v /vendor/` + go test -race -cover -v `go list ./... | grep -v /vendor/` cover: go test -cover `go list ./... | grep -v /vendor/` @@ -27,6 +25,11 @@ lint: vet: go vet `go list ./... | grep -v /vendor/` -cover-old: - #go test -coverprofile=cover.tmp `go list ./... | grep -v /vendor/` && go tool cover -html=cover.tmp `go list ./... | grep -v /vendor/` +clean: + go clean + +upgrade: + go get -u +env: + go env diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8598b9b --- /dev/null +++ b/go.mod @@ -0,0 +1,22 @@ +module github.com/Travix-International/go-servicefoundation + +require ( + github.com/Travix-International/go-metrics v1.5.1 + github.com/Travix-International/logger v0.6.0 + github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a // indirect + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf // indirect + github.com/julienschmidt/httprouter v1.1.0 + github.com/matttproud/golang_protobuf_extensions v1.0.0 // indirect + github.com/pkg/errors v0.8.0 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v0.8.0 + github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5 // indirect + github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba // indirect + github.com/prometheus/procfs v0.0.0-20171216224917-f98634e40885 // indirect + github.com/rs/cors v0.0.0-20170727213201-7af7a1e09ba3 + github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541 // indirect + github.com/stretchr/testify v1.1.4 + golang.org/x/net v0.0.0-20171212005608-d866cfc389ce + golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..967dc6a --- /dev/null +++ b/go.sum @@ -0,0 +1,36 @@ +github.com/Travix-International/go-metrics v1.5.1 h1:vk0tr5d7MlNlIBI8rfAO3+Z/nucrBF93ua83UsvxA5s= +github.com/Travix-International/go-metrics v1.5.1/go.mod h1:lbRlN6gytDilG5VsVrORpENEWrjHr4Xd8Jm4E4ebpZA= +github.com/Travix-International/logger v0.6.0 h1:d6FK2JwIoM8mLE+F7gVuuDH/RSSz7e19OjjgXmzCNvI= +github.com/Travix-International/logger v0.6.0/go.mod h1:148BLLMpf0IwDjf96U7r4tIYo+CpQSwc6S2D8LWHRZY= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a h1:BtpsbiV638WQZwhA98cEZw2BsbnQJrbd0BI7tsy0W1c= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +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/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0= +github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/julienschmidt/httprouter v1.1.0 h1:7wLdtIiIpzOkC9u6sXOozpBauPdskj3ru4EI5MABq68= +github.com/julienschmidt/httprouter v1.1.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/matttproud/golang_protobuf_extensions v1.0.0 h1:YNOwxxSJzSUARoD9KRZLzM9Y858MNGCOACTvCW9TSAc= +github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/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/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5 h1:cLL6NowurKLMfCeQy4tIeph12XNQWgANCNvdyrOYKV4= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba h1:/MUKoJbk4oXV3uxkpfHVkmVfL+wzWW6dttaW26s07Gg= +github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/procfs v0.0.0-20171216224917-f98634e40885 h1:jEQdQynj0YAyrzXTinwWiZyupQrhpGAmlO99z3DKBQM= +github.com/prometheus/procfs v0.0.0-20171216224917-f98634e40885/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/rs/cors v0.0.0-20170727213201-7af7a1e09ba3 h1:86ukAHRTa2CXdBnWJHcjjPPGTyLGEF488OFRsbBAuFs= +github.com/rs/cors v0.0.0-20170727213201-7af7a1e09ba3/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541 h1:nvL7eaZN/Zw5emVOGaOclbLMeFO030UrPtWFTUS0p80= +github.com/stretchr/objx v0.0.0-20150928122152-1a9d0bb9f541/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.1.4 h1:ToftOQTytwshuOSj6bDSolVUa3GINfJP/fg3OkkOzQQ= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4= +golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=