util

package
v0.15.0-alpha13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectExistVars

func DetectExistVars(templates map[string]string, values map[string]string) (newValues map[string]string)

DetectExistVars filter the used vars in templates

func GenerateAllFormatVar

func GenerateAllFormatVar(values map[string]string, baseVarName, baseValue string)

GenerateAllFormatVar fill all format var into values

func ReadTemplate

func ReadTemplate(templateFile string) string

ReadTemplate read a file to string

func ReplaceVar

func ReplaceVar(s, varName, value string) string

ReplaceVar will replace s with value and return it

func ReplaceVarInFile

func ReplaceVarInFile(filename string, reg *regexp.Regexp, new string)

ReplaceVarInFile replacte var into file without reading

func ReplaceVarInTemplates

func ReplaceVarInTemplates(templates map[string]string, valueMap map[string]string)

ReplaceVarInTemplates replace var with templates into templates

func ReplaceVars

func ReplaceVars(s string, valueMap map[string]string) string

ReplaceVars will replace s with valueMap and return it

func WriteTemplates

func WriteTemplates(path string, templates map[string]string)

WriteTemplates write some strings to files

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL