How to run all .go files within current directory through the command line (multi file package)

前端 未结 11 2585
滥情空心
滥情空心 2020-12-08 01:49

I\'m a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size.

go r

11条回答
  •  情书的邮戳
    2020-12-08 02:27

    For peoples attempting to use go run combined with go generate a solution can be :

    //go:generate sh -c "go run path/*.go"
    

提交回复
热议问题