refatoração de segurança e logs
This commit is contained in:
parent
6873b87a85
commit
663a8d5bf2
12 changed files with 362 additions and 37 deletions
|
|
@ -7,9 +7,8 @@ import (
|
|||
)
|
||||
|
||||
func mustParseTemplates() *template.Template {
|
||||
// Local filesystem parsing (keeps the repo simple).
|
||||
// If you want a single-binary deploy, we can switch to go:embed by moving
|
||||
// templates into internal/elinps and embedding without "..".
|
||||
// Parse de templates via filesystem local (mantém o repositório simples).
|
||||
// Se precisarmos de deploy single-binary, podemos migrar para go:embed.
|
||||
funcs := template.FuncMap{
|
||||
"seq": func(start, end int) []int {
|
||||
if end < start {
|
||||
|
|
@ -25,7 +24,7 @@ func mustParseTemplates() *template.Template {
|
|||
return ptr != nil && *ptr == v
|
||||
},
|
||||
"produtoLabel": func(produto string) string {
|
||||
// Best-effort label from normalized produto.
|
||||
// Label "amigável" a partir do produto normalizado.
|
||||
p := strings.ReplaceAll(produto, "_", " ")
|
||||
parts := strings.Fields(p)
|
||||
for i := range parts {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue