bodyclose: fix race condition
This commit is contained in:
parent
7e170af626
commit
d2b1eea2c6
@ -20,7 +20,9 @@ services:
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: curl -sL https://git.io/goreleaser | bash
|
||||
script:
|
||||
- make test_race
|
||||
- curl -sL https://git.io/goreleaser | bash
|
||||
on:
|
||||
tags: true
|
||||
# it's important to build on the newest version of go:
|
||||
|
5
go.mod
5
go.mod
@ -49,7 +49,7 @@ require (
|
||||
github.com/spf13/pflag v1.0.1
|
||||
github.com/spf13/viper v1.0.2
|
||||
github.com/stretchr/testify v1.2.2
|
||||
github.com/timakin/bodyclose v0.0.0-20190713050349-d96ec0dee822
|
||||
github.com/timakin/bodyclose v0.0.0-00010101000000-000000000000
|
||||
github.com/valyala/quicktemplate v1.1.1
|
||||
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a // indirect
|
||||
golang.org/x/net v0.0.0-20190313220215-9f648a60d977 // indirect
|
||||
@ -62,3 +62,6 @@ require (
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
|
||||
mvdan.cc/unparam v0.0.0-20190124213536-fbb59629db34
|
||||
)
|
||||
|
||||
// https://github.com/timakin/bodyclose/pull/17
|
||||
replace github.com/timakin/bodyclose => github.com/golangci/bodyclose v0.0.0-20190713050349-65da19158fa2
|
||||
|
4
go.sum
4
go.sum
@ -49,6 +49,8 @@ github.com/golang/mock v1.0.0 h1:HzcpUG60pfl43n9d2qbdi/3l1uKpAmxlfWEPWtV/QxM=
|
||||
github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golangci/bodyclose v0.0.0-20190713050349-65da19158fa2 h1:RDWiBQrrsIhyHdWW/4d0jHMlfwKouMtnsjSJ6AzuBHg=
|
||||
github.com/golangci/bodyclose v0.0.0-20190713050349-65da19158fa2/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=
|
||||
@ -162,8 +164,6 @@ github.com/spf13/viper v1.0.2 h1:Ncr3ZIuJn322w2k1qmzXDnkLAdQMlJqBa9kfAH+irso=
|
||||
github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/timakin/bodyclose v0.0.0-20190713050349-d96ec0dee822 h1:uVnVN3IUKAVcB3xG26bThgwXkWaGFc9i5qFHYKy4TKc=
|
||||
github.com/timakin/bodyclose v0.0.0-20190713050349-d96ec0dee822/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
|
||||
|
4
vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go
generated
vendored
4
vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go
generated
vendored
@ -38,7 +38,9 @@ type runner struct {
|
||||
skipFile map[*ast.File]bool
|
||||
}
|
||||
|
||||
func (r *runner) run(pass *analysis.Pass) (interface{}, error) {
|
||||
// run executes an analysis for the pass. The receiver is passed
|
||||
// by value because this func is called in parallel for different passes.
|
||||
func (r runner) run(pass *analysis.Pass) (interface{}, error) {
|
||||
r.pass = pass
|
||||
funcs := pass.ResultOf[buildssa.Analyzer].(*buildssa.SSA).SrcFuncs
|
||||
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -181,7 +181,7 @@ github.com/spf13/viper
|
||||
# github.com/stretchr/testify v1.2.2
|
||||
github.com/stretchr/testify/assert
|
||||
github.com/stretchr/testify/require
|
||||
# github.com/timakin/bodyclose v0.0.0-20190713050349-d96ec0dee822
|
||||
# github.com/timakin/bodyclose v0.0.0-00010101000000-000000000000 => github.com/golangci/bodyclose v0.0.0-20190713050349-65da19158fa2
|
||||
github.com/timakin/bodyclose/passes/bodyclose
|
||||
# github.com/valyala/bytebufferpool v1.0.0
|
||||
github.com/valyala/bytebufferpool
|
||||
|
Loading…
x
Reference in New Issue
Block a user