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

Sugestão de Melhora #5

Open
viniciusmesquitac opened this issue Apr 5, 2020 · 0 comments
Open

Sugestão de Melhora #5

viniciusmesquitac opened this issue Apr 5, 2020 · 0 comments

Comments

@viniciusmesquitac
Copy link

viniciusmesquitac commented Apr 5, 2020

Arquivo: jsonParser

A função addingTaskInFile(goal: Goal) -> String é contra intuitiva pois ela retorna um json em formato de string, quando deveria adicionar a task dentro de um arquivo.

Sugestão:

remover o retorno -> String e escrever e utilizar a função writeInFile dentro do escopo, para finalizar o processo de adição ou alterar o nome para algo do tipo addingTaskAndGetEncodedStringJsonData

A função writeInFile(json: String?) deveria evitar receber o Optional String?, e ela nunca receberá nulo da função addingTaskInFile(goal: Goal) -> String, poderia ser apenas writeInFile(json: String)

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

No branches or pull requests

1 participant