Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceToString ¶
func InterfaceToString(value interface{}) string
Generic Function to convert Interface to String
Types ¶
type TextReplace ¶
type TextReplace struct { Tags Tags Filename string FileObj *os.File YAMLfile string OutputPath string OutputFileName string Keys map[string]interface{} }
YAML file and source file path should be assigned to the Struct, then Mapper method needs to be called to execute the task
func (*TextReplace) GetYAMLValues ¶
func (t *TextReplace) GetYAMLValues() (map[string]interface{}, error)
Get YAML Key-Values from file
func (*TextReplace) Reader ¶
func (t *TextReplace) Reader() (Tags, *os.File, error)
Read the file and get the Tags
func (*TextReplace) Replace ¶
func (t *TextReplace) Replace() error
Replace the Tags with corresponding Values from the YAML
func (*TextReplace) Run ¶
func (t *TextReplace) Run() error
Final Mapper Function which executes the logics in sync
func (*TextReplace) Validate ¶
func (t *TextReplace) Validate() error
Validate to check whether all the keys present in the file is present in the YAML file
Click to show internal directories.
Click to hide internal directories.