$ cd $GOPATH/src/github.com/kotaoue/goimport/packages/car
$ go mod init
$ cd $GOPATH/src/github.com/kotaoue/goimport/
$ go mod init github.com/kotaoue/goimport
$ go mod edit -replace github.com/kotaoue/goimport/packages/car=./packages/car
# When build completed a require for "packages/car" are attached on "go.mod".
$ go build main.go
$ go list -m all
github.com/kotaoue/goimport
github.com/kotaoue/goimport/packages/car v0.0.0-00010101000000-000000000000 => ./packages/car
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c
rsc.io/quote v1.5.2
rsc.io/sampler v1.3.0
Result
$ go run main.go
2020/06/24 10:51:27 Start
2020/06/24 10:51:27 こんにちは世界。
2020/06/24 10:51:27 vroom!!
2020/06/24 10:51:27 End