-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gerando readme.txt #586
base: main
Are you sure you want to change the base?
gerando readme.txt #586
Conversation
joellensilva
commented
Jan 27, 2025
- depende retornando avisos dos órgãos do BD storage#143 (falta atualizar a versão)
- texto ainda em revisão pelo Cristiano
- gera um readme do pacote de dados, com avisos a partir da especificação do órgão (e ano/mês) através de query params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bom trabalho!
// Gravar o conteúdo atualizado no arquivo temporário | ||
readmeFile = "readme_atualizado.txt" | ||
err = os.WriteFile(readmeFile, newContent, 0644) | ||
if err != nil { | ||
return c.JSON(http.StatusInternalServerError, fmt.Errorf("erro ao gravar o arquivo temporário: %q", err)) | ||
} | ||
defer os.Remove(readmeFile) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rever: Não entendi porque um arquivo temporário é salvo para depois ser removido. Se isso puder ser evitado, evitaríamos um acesso ao disco (muito demorado).
if err != nil { | ||
return c.JSON(http.StatusBadRequest, fmt.Sprintf("Parâmetro ANO inválido: %s.", year)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dúvida: Por que em alguns lugares foi usado fmt.Errorf()
e aqui foi usado fmt.Sprintf()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excelente!
- cron: "0 3 * * 2,4" | ||
workflow_dispatch: | ||
# schedule: | ||
# - cron: "0 3 * * 2,4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Só confirmando: essas linhas ficam comentadas até a definição da política de deploy/manutenção/revisão, né?