Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

gerando readme.txt #586

wants to merge 3 commits into from

Conversation

joellensilva
Copy link
Contributor

  • 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

@joellensilva joellensilva marked this pull request as ready for review February 12, 2025 14:55
Copy link

@fonluiz fonluiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bom trabalho!

Comment on lines +874 to +881
// 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)
}
Copy link

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).

Comment on lines +833 to +835
if err != nil {
return c.JSON(http.StatusBadRequest, fmt.Sprintf("Parâmetro ANO inválido: %s.", year))
}
Copy link

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()?

Copy link

@rdurl0 rdurl0 left a 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"
Copy link

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é?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants