Skip to content

Commit

Permalink
Dependency and Makefile cleanups (#142)
Browse files Browse the repository at this point in the history
Also update codes to fix new deprecation warning introduced by upgrading deps
  • Loading branch information
jhump authored Oct 8, 2021
1 parent 55c6026 commit c1af502
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 345 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine as builder
FROM golang:1.15-alpine as builder
MAINTAINER FullStory Engineering

# create non-privileged group and user
Expand All @@ -13,8 +13,6 @@ COPY standalone /tmp/fullstorydev/grpcui/standalone
# and build a completely static binary (so we can use
# scratch as basis for the final image)
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
ENV GO111MODULE=on
RUN go build -o /grpcui \
-ldflags "-w -extldflags \"-static\" -X \"main.version=$(cat VERSION)\"" \
Expand Down
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install:

.PHONY: release
release:
@GO111MODULE=on go install github.com/goreleaser/goreleaser
@go install github.com/goreleaser/goreleaser@v0.134.0
goreleaser --rm-dist

.PHONY: docker
Expand All @@ -33,9 +33,9 @@ docker:

.PHONY: generate
generate:
@go install github.com/go-bindata/go-bindata/go-bindata
@go install google.golang.org/protobuf/cmd/protoc-gen-go
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
@go install github.com/go-bindata/go-bindata/go-bindata@8639be0519b3
@go install google.golang.org/protobuf/cmd/protoc-gen-go@a709e31e5d12
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1.0
go generate ./...

.PHONY: checkgofmt
Expand All @@ -51,29 +51,31 @@ vet:

.PHONY: staticcheck
staticcheck:
@GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck
@go install honnef.co/go/tools/cmd/staticcheck@v0.0.1-2020.1.4
staticcheck ./...

.PHONY: ineffassign
ineffassign:
@GO111MODULE=on go install github.com/gordonklaus/ineffassign
@go install github.com/gordonklaus/ineffassign@7953dde2c7bf
ineffassign .

.PHONY: predeclared
predeclared:
@GO111MODULE=on go install github.com/nishanths/predeclared
@go install github.com/nishanths/predeclared@86fad755b4d3
predeclared .

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
@GO111MODULE=on go install golang.org/x/lint/golint
# TODO: pin version
@go install golang.org/x/lint/golint@latest
golint -min_confidence 0.9 -set_exit_status ./...

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
@GO111MODULE=on go install github.com/kisielk/errcheck
# TODO: pin version
@go install github.com/kisielk/errcheck@latest
errcheck ./...

.PHONY: test
Expand Down
6 changes: 3 additions & 3 deletions cmd/grpcui/grpcui.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ func main() {
}
var creds credentials.TransportCredentials
if !*plaintext {
var err error
creds, err = grpcurl.ClientTransportCredentials(*insecure, *cacert, *cert, *key)
tlsConf, err := grpcurl.ClientTLSConfig(*insecure, *cacert, *cert, *key)
if err != nil {
fail(err, "Failed to configure transport credentials")
fail(err, "Failed to create TLS config")
}
creds = credentials.NewTLS(tlsConf)
if *serverName != "" {
if err := creds.OverrideServerName(*serverName); err != nil {
fail(err, "Failed to override server name as %q", *serverName)
Expand Down
13 changes: 3 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
module github.com/fullstorydev/grpcui

go 1.13
go 1.15

require (
github.com/fullstorydev/grpcurl v1.8.2
github.com/go-bindata/go-bindata v0.0.0-20191126083508-8639be0519b3 // indirect
github.com/fullstorydev/grpcurl v1.8.5
github.com/golang/protobuf v1.4.2
github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf // indirect
github.com/goreleaser/goreleaser v0.134.0 // indirect
github.com/jhump/protoreflect v1.9.0
github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3 // indirect
github.com/jhump/protoreflect v1.10.1
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/net v0.0.0-20200625001655-4c5254603344
google.golang.org/api v0.29.0 // indirect
google.golang.org/grpc v1.37.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 // indirect
google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
)
Loading

0 comments on commit c1af502

Please sign in to comment.