Closed davidgamero closed 1 year ago
Introduce new TemplateWriter interface with the following methods:
TemplateWriter
WriteFile(string, []byte, os.FileMode) error EnsureDirectory(string) error
This allows templates to be generated for arbitrary use cases independent of the local filesystem (ex: in-memory template generation)
Refactor dockerfile and deployment generation to use new interface, and added existing os filesystem write methods into the LocalFSWriter struct
LocalFSWriter
Add TemplateWrite property to CreateCommand and set to the LocalFSWriter to maintain existing functionality
TemplateWrite
CreateCommand
Introduce new
TemplateWriter
interface with the following methods:This allows templates to be generated for arbitrary use cases independent of the local filesystem (ex: in-memory template generation)
Refactor dockerfile and deployment generation to use new interface, and added existing os filesystem write methods into the
LocalFSWriter
structAdd
TemplateWrite
property toCreateCommand
and set to theLocalFSWriter
to maintain existing functionality