qur / withmock

Automatic Go package mock generation tool
Other
71 stars 9 forks source link

withmock no run in go1.9 #59

Closed Ronniexie closed 5 years ago

Ronniexie commented 5 years ago

go version

go version go1.9.6 linux/amd64

withmock go test

can't load package: package acheck/pkg/testhttp: invalid import path "acheck/pkg/testhttp" ERROR: exit status 1

Reason: go1.9 add a check "func SafeArg" in https://github.com/golang/go/blob/release-branch.go1.9/src/cmd/go/internal/load/pkg.go Less obviously, args beginning with @ are not safe (they look like GNU binutils flagfile specifiers, sometimes called "response files")

So,withmock need modify (testMark mark = "@") in lib/lib.go