Documentation ¶
Index ¶
- func ApplyTemplate(tmpl *template.Template, data interface{}) (strings.Builder, error)
- func CreateTemplate(templateName, content string) (*template.Template, error)
- func GenerateBadge(name, message, color, href string, properties interface{}) string
- func GenerateElement(tag string, properties map[string]string, children string) string
- func GenerateViewsBadge(badgeProperties interface{}) string
- func JoinFile(fileName string) string
- func NormalizeColor(color string) string
- func OpenFile(fileName string) (*os.File, error)
- func OpenReadFile(fileName string) ([]byte, error)
- func QueryFromObject(properties interface{}, isSnakeCase bool) string
- func ReadFileContent(file *os.File) ([]byte, error)
- func WriteFile(filePath, content string) error
- type ElementData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTemplate ¶
applyTemplate aplica o template aos dados e retorna a string resultante.
func CreateTemplate ¶
createTemplate cria um novo template com a sintaxe esperada.
func GenerateBadge ¶
GenerateBadge generates a badge HTML element.
func GenerateElement ¶
GenerateElement gera e retorna a string do elemento HTML.
func GenerateViewsBadge ¶
func GenerateViewsBadge(badgeProperties interface{}) string
GenerateViewsBadge generates a views badge HTML element.
func NormalizeColor ¶
func OpenReadFile ¶
func QueryFromObject ¶
QueryFromObject gera e retorna uma string de consulta a partir dos campos de uma estrutura.
func ReadFileContent ¶
readFileContent lê o conteúdo do arquivo fornecido.
Types ¶
Click to show internal directories.
Click to hide internal directories.