I am at this time creating more and more of small one-off projects in golang but I see many makefile tasks are literally copy&paste from across projects. For example, in every project I have a:
${APP_NAME}: $(SOURCES)
go get ./...
goimports -w $(SOURCES)
go build -o ${APP_NAME}
I would like to know if anyone has experience of fragment extraction into a separate project and importing it. If so, how do you do it?
Just curl a file from
raw.githubusercontent.com
? Because that's what I'm about to do since I don't see any other easy way.I also thought about using git submodules but that seems also a bit over the top for a couple of files.