Rendering templates is cool and all.
But what if you need to copy a file into the compiled output? This could be a binary, zip-archive, ...
How should we implement this?
My initial thought was to attach this to the templating process.
But actually, plainly copying files has nothing to do with the template rendering process.
What if we add it to the components?
This would work, but it would only work with components. What if the user does not use components but wants to copy files?
To make this as portable as possible, maybe just add a CopyConfig to the main SkipperConfig in skipper.go. One would only need to specify source and target file. Relative base-path should be the template-root.
The copying logic should be moved to a new file, e.g. copy.go, filesystem.go, ...
Rendering templates is cool and all. But what if you need to copy a file into the compiled output? This could be a binary, zip-archive, ...
How should we implement this?
CopyConfig
to the mainSkipperConfig
inskipper.go
. One would only need to specify source and target file. Relative base-path should be the template-root.copy.go
,filesystem.go
, ...