Skip to content

Commit

Permalink
Merge pull request #81 from Workiva/remove-gorilla-context
Browse files Browse the repository at this point in the history
Remove gorilla/context
  • Loading branch information
bradwest-wk authored Nov 23, 2020
2 parents d26de9a + b38a956 commit 9af7759
Show file tree
Hide file tree
Showing 11 changed files with 223 additions and 124 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: go

go:
- "1.5"
- "1.10"
- "1.15"
- tip

before_install: go get golang.org/x/tools/cmd/cover
script: go test -cover ./...
script:
- go test -cover ./...

notifications:
email: false
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
FROM golang:1.10.3-alpine3.8
FROM golang:1.15-alpine

RUN apk add --update build-base git openssh

## github credentials
RUN apk add --update bash curl git openssh py-pip
ARG GIT_SSH_KEY
RUN git config --global [email protected]:.insteadOf https://github.com/
RUN mkdir ~/.ssh; ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts
RUN chmod -R 700 ~/.ssh; echo "${GIT_SSH_KEY}" > ~/.ssh/id_rsa; chmod 600 ~/.ssh/id_rsa
RUN eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa
RUN eval "$(ssh-agent -s)" && \
ssh-add ~/.ssh/id_rsa

#install glide
RUN go get -u github.com/Masterminds/glide
ENV GOPATH=/go
ENV BUILD_PATH=$GOPATH/src/github.com/Workiva/go-rest

WORKDIR /go/src/github.com/Workiva/go-rest
COPY . /go/src/github.com/Workiva/go-rest
WORKDIR $BUILD_PATH

# install dependencies
RUN glide install
COPY go.mod $BUILD_PATH/
COPY go.sum $BUILD_PATH/
COPY rest $BUILD_PATH/rest

# run tests
RUN go test $(glide novendor)
RUN test -z $(go fmt ./...)
RUN go mod download
RUN test -z $(go mod tidy -v)
RUN go mod verify
RUN go build ./...
RUN go test ./...

# artifacts
ARG BUILD_ARTIFACTS_AUDIT=/go/src/github.com/Workiva/go-rest/glide.lock
ARG BUILD_ARTIFACTS_AUDIT=/go/src/github.com/Workiva/go-rest/go.sum

# no-op container
FROM scratch
19 changes: 0 additions & 19 deletions glide.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/Workiva/go-rest

go 1.15

require (
github.com/gorilla/mux v1.8.0
github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69
github.com/stretchr/testify v1.6.1
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
)
18 changes: 18 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69 h1:umaj0TCQ9lWUUKy2DxAhEzPbwd0jnxiw1EI2z3FiILM=
github.com/hoisie/mustache v0.0.0-20160804235033-6375acf62c69/go.mod h1:zdLK9ilQRSMjSeLKoZ4BqUfBT7jswTGF8zRlKEsiRXA=
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/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU=
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading

0 comments on commit 9af7759

Please sign in to comment.