Documentation
¶
Overview ¶
pacakge Cmdutils
Wraps around the ConfigManager library with additional postprocessing capabilities for output management when used with cli flags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdUtils ¶
type CmdUtils struct {
// contains filtered or unexported fields
}
func New ¶
func New(confManager configManagerIface, logger log.ILogger, writer io.WriteCloser) *CmdUtils
func (*CmdUtils) GenerateFromCmd ¶
GenerateFromTokens is a helper cmd method to call from retrieve command
func (*CmdUtils) GenerateStrOut ¶
Generate a replaced string from string input command
returns a non empty string if move of temp file is required
type PostProcessor ¶
type PostProcessor struct { ProcessedMap generator.ParsedMap Config *config.GenVarsConfig // contains filtered or unexported fields }
PostProcessor processes the rawMap and outputs the result depending on cmdline options
func (*PostProcessor) ConvertToExportVar ¶
func (p *PostProcessor) ConvertToExportVar() []string
ConvertToExportVar assigns the k/v out as unix style export key=val pairs separated by `\n`
func (*PostProcessor) FlushOutToFile ¶
func (p *PostProcessor) FlushOutToFile(w io.Writer) error
FlushOutToFile saves contents to file provided in the config input into the generator default location is ./app.env
can also be to stdout or another file location
type WriterCloserWrapper ¶
func (*WriterCloserWrapper) Close ¶
func (swc *WriterCloserWrapper) Close() error