Skip to content

Commit

Permalink
Enable staticcheck and fix issues (#302)
Browse files Browse the repository at this point in the history
This adds staticcheck to our `make lint` and fixes issues reported by it.

Of the failures reported by staticcheck, the following were actual
issues:

- shallowCheckDependencies: addMissingNodes was unused. I think this was
  intended to go into visualiziation somehow, but we never did it.
- digSentinel fields on dig.In/Out can be hidden away
- A test validating that we don't allow the `Group` provide option for
  `dig.Out`-based structs was not actually using the result struct
  declared there so it wasn't testing what it claimed to test.

Besides that, there were a number of unused fields in test structs.
These are intentionally unused fields so I've appeased the linter by
referencing them with `_ = ..` assignments.
  • Loading branch information
abhinav committed Dec 4, 2021
1 parent 9b89655 commit d83e159
Show file tree
Hide file tree
Showing 13 changed files with 150 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
${{ runner.os }}-go-
- name: Download Dependencies
run: go mod download
run: make install

- name: Lint
if: matrix.latest
Expand Down
30 changes: 25 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
export GOBIN ?= $(shell pwd)/bin

BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem
GOLINT = $(GOBIN)/golint
STATICCHECK = $(GOBIN)/staticcheck

BENCH_FLAGS ?= -cpuprofile=cpu.pprof -memprofile=mem.pprof -benchmem

GO_FILES := $(shell \
GO_FILES = $(shell \
find . '(' -path '*/.*' -o -path './vendor' ')' -prune \
-o -name '*.go' -print | cut -b3-)

MODULES = . ./tools

.PHONY: all
all: build lint test

.PHONY: build
build:
go build ./...

.PHONY: install
install:
$(foreach dir,$(MODULES),( \
cd $(dir) && \
go mod download) && \
) true

.PHONY: lint
lint: $(GOLINT)
lint: $(GOLINT) $(STATICCHECK)
@rm -rf lint.log
@echo "Checking formatting..."
@gofmt -d -s $(GO_FILES) 2>&1 | tee lint.log
@echo "Checking vet..."
@go vet ./... 2>&1 | tee -a lint.log
@echo "Checking lint..."
@$(GOLINT) ./... 2>&1 | tee -a lint.log
@echo "Checking staticcheck..."
@$(STATICCHECK) ./... 2>&1 | tee -a lint.log
@echo "Checking for unresolved FIXMEs..."
@git grep -i fixme | grep -v -e Makefile | tee -a lint.log
@echo "Checking for license headers..."
@./check_license.sh | tee -a lint.log
@[ ! -s lint.log ]

$(GOLINT):
go install golang.org/x/lint/golint
$(GOLINT): tools/go.mod
cd tools && go install golang.org/x/lint/golint

$(STATICCHECK): tools/go.mod
cd tools && go install honnef.co/go/tools/cmd/staticcheck

.PHONY: test
test:
Expand All @@ -45,3 +61,7 @@ cover:
BENCH ?= .
bench:
go list ./... | xargs -n1 go test -bench=$(BENCH) -run="^$$" $(BENCH_FLAGS)

.PHONY: tidy
tidy:
$(foreach dir,$(MODULES),(cd $(dir) && go mod tidy) &&) true
21 changes: 19 additions & 2 deletions dig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,9 @@ func TestGroups(t *testing.T) {
}

func(i int) {
require.Error(t, c.Provide(func() {
require.Error(t, c.Provide(func() out {
t.Fatal("This should not be called")
return out{}
}, Group("val")), "This Provide should fail")
}(1)
})
Expand Down Expand Up @@ -1425,7 +1426,7 @@ func TestProvideConstructorErrors(t *testing.T) {

t.Run("name option cannot be provided for result structs", func(t *testing.T) {
c := New()
type A struct{ idx int }
type A struct{}

type out struct {
Out
Expand Down Expand Up @@ -2660,6 +2661,9 @@ func testInvokeFailures(t *testing.T, dryRun bool) {
A1 A // all is good
a2 A // oops, unexported type
}

_ = in{}.a2 // unused but needed for the test

require.NoError(t, c.Provide(func() A { return A{} }))

err := c.Invoke(func(i in) { assert.Fail(t, "should never get in here") })
Expand All @@ -2679,6 +2683,8 @@ func testInvokeFailures(t *testing.T, dryRun bool) {
foo string
}

_ = in{}.foo // unused but needed for the test

err := c.Provide(func(in) int { return 0 })
require.Error(t, err, "Provide must fail")
assertErrorMatches(t, err,
Expand All @@ -2702,6 +2708,9 @@ func testInvokeFailures(t *testing.T, dryRun bool) {
type in struct {
Embed
}

_ = in{}.a2 // unused but needed for the test

require.NoError(t, c.Provide(func() A { return A{} }))

err := c.Invoke(func(i in) { assert.Fail(t, "should never get in here") })
Expand All @@ -2721,6 +2730,9 @@ func testInvokeFailures(t *testing.T, dryRun bool) {

string // embed an unexported std type
}

_ = param{}.string // unused but needed for the test

err := c.Invoke(func(p param) { assert.Fail(t, "should never get here") })
require.Error(t, err)
assertErrorMatches(t, err,
Expand Down Expand Up @@ -3229,6 +3241,7 @@ func TestUnexportedFieldsFailures(t *testing.T) {
type type1 struct{}
type type2 struct{}
type type3 struct{}

constructor := func() (*type1, *type2) {
return &type1{}, &type2{}
}
Expand All @@ -3241,10 +3254,12 @@ func TestUnexportedFieldsFailures(t *testing.T) {
T2 *type2 `optional:"true"` // optional type present in the graph
t3 *type3
}

require.NoError(t, c.Provide(constructor))
err := c.Invoke(func(p param) {
require.NotNil(t, p.T1, "whole param struct should not be nil")
assert.NotNil(t, p.T2, "optional type in the graph should not return nil")
_ = p.t3 // unused
})
require.Error(t, err)
assert.Contains(t, err.Error(),
Expand All @@ -3267,10 +3282,12 @@ func TestUnexportedFieldsFailures(t *testing.T) {
T2 *type2 `optional:"true"` // optional type present in the graph
t3 *type3
}

require.NoError(t, c.Provide(constructor))
err := c.Invoke(func(p param) {
require.NotNil(t, p.T1, "whole param struct should not be nil")
assert.NotNil(t, p.T2, "optional type in the graph should not return nil")
_ = p.t3
})
require.Error(t, err)
assert.Contains(t, err.Error(),
Expand Down
6 changes: 1 addition & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ module go.uber.org/dig

go 1.13

require (
github.com/stretchr/testify v1.4.0
golang.org/x/lint v0.0.0-20190930215403-16217165b5de
golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab // indirect
)
require github.com/stretchr/testify v1.4.0
13 changes: 0 additions & 13 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab h1:tpc/nJ4vD66vAk/2KN0sw/DvQIz2sKmCpWvyKtPmfMQ=
golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
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.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
Expand Down
14 changes: 6 additions & 8 deletions inout.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ var (
_outType = reflect.TypeOf(Out{})
)

// Special interface embedded inside dig sentinel values (dig.In, dig.Out) to
// make their special nature obvious in the godocs. Otherwise they will appear
// as plain empty structs.
type digSentinel interface {
digSentinel()
}
// Placeholder type placed in dig.In/dig.out to make their special nature
// obvious in godocs.
// Otherwise they will appear as plain empty structs.
type digSentinel struct{}

// In may be embedded into structs to request dig to treat them as special
// parameter structs. When a constructor accepts such a struct, instead of the
Expand All @@ -58,7 +56,7 @@ type digSentinel interface {
// group Name of the Value Group from which this field will be filled.
// The field must be a slice type. See Value Groups in the
// package documentation for more information.
type In struct{ digSentinel }
type In struct{ _ digSentinel }

// Out is an embeddable type that signals to dig that the returned
// struct should be treated differently. Instead of the struct itself
Expand All @@ -79,7 +77,7 @@ type In struct{ digSentinel }
// group Name of the Value Group to which this field's value is being
// sent. See Value Groups in the package documentation for more
// information.
type Out struct{ digSentinel }
type Out struct{ _ digSentinel }

func isError(t reflect.Type) bool {
return t.Implements(_errType)
Expand Down
3 changes: 0 additions & 3 deletions invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"reflect"

"go.uber.org/dig/internal/digreflect"
"go.uber.org/dig/internal/dot"
"go.uber.org/dig/internal/graph"
)

Expand Down Expand Up @@ -95,12 +94,10 @@ func (c *Container) Invoke(function interface{}, opts ...InvokeOption) error {
// the container. Returns an error if not.
func shallowCheckDependencies(c containerStore, pl paramList) error {
var err errMissingTypes
var addMissingNodes []*dot.Param

missingDeps := findMissingDependencies(c, pl.Params...)
for _, dep := range missingDeps {
err = append(err, newErrMissingTypes(c, key{name: dep.Name, t: dep.Type})...)
addMissingNodes = append(addMissingNodes, dep.DotParam()...)
}

if len(err) > 0 {
Expand Down
8 changes: 8 additions & 0 deletions param_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ func TestParamObjectWithUnexportedFieldsSuccess(t *testing.T) {
t2 type2
}

_ = in{}.t2 // unused

po, err := newParamObject(reflect.TypeOf(in{}), New())
require.NoError(t, err)

Expand All @@ -134,6 +136,8 @@ func TestParamObjectFailure(t *testing.T) {
a2 A
}

_ = in{}.a2 // unused but needed

_, err := newParamObject(reflect.TypeOf(in{}), New())
require.Error(t, err)
assert.Contains(t, err.Error(),
Expand All @@ -149,6 +153,8 @@ func TestParamObjectFailure(t *testing.T) {
a2 A
}

_ = in{}.a2 // unused but needed

_, err := newParamObject(reflect.TypeOf(in{}), New())
require.Error(t, err)
assert.Contains(t, err.Error(),
Expand All @@ -164,6 +170,8 @@ func TestParamObjectFailure(t *testing.T) {
a2 A
}

_ = in{}.a2 // unused but needed

_, err := newParamObject(reflect.TypeOf(in{}), New())
require.Error(t, err)
assert.Contains(t, err.Error(),
Expand Down
24 changes: 24 additions & 0 deletions tools/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2021 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// Package tools exists to make this directory a valid Go package.
// The tools.go has a build tag that excludes it from being considered by Go
// tooling except for dependency constraints.
package tools
11 changes: 11 additions & 0 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/uber-go/dig/tools

go 1.16

require (
github.com/BurntSushi/toml v0.4.1 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/tools v0.1.8 // indirect
honnef.co/go/tools v0.2.2
)
47 changes: 47 additions & 0 deletions tools/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/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.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
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-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
honnef.co/go/tools v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk=
honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY=
4 changes: 3 additions & 1 deletion tools_test.go → tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
//go:build tools
// +build tools

package dig
package tools

import (
// Tools we use during development.
_ "golang.org/x/lint/golint"
_ "honnef.co/go/tools/cmd/staticcheck"
)
Loading

0 comments on commit d83e159

Please sign in to comment.