如何不使用复制命令在大厅上测试golang代码?

In Concourse I used topflighttech/go-testing docker container to test my-go-api. I find that the simplest solution is just copy src code to /go/src/my-go-api and test it. But I wondering how we could test on concourse straightforward without copy to /go/src/myapi? So the image could stay smaller.

Of course mv is not working. Here is output from Concourse.

+ mv my-go-api /go/src
mv: can't remove 'my-go-api': Resource busy

You cannot mv because Concourse makes the inputs available as container volumes, so you cannot delete a volume (side-effect of mv).

I wrote a blog post some time ago that shows how to build Go code without any cp: Building Go code, with and without Go modules, with Concourse

I am not familiar with topflighttech/go-testing so I cannot give specific advice, but I believe that the blog post will put you in the right direction.