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

Linter suggestions #5

Merged
merged 3 commits into from
Jan 23, 2020
Merged

Conversation

asahasrabuddhe
Copy link
Contributor

No description provided.

@knadh
Copy link
Owner

knadh commented Jan 22, 2020

Thanks for the PR. Couple things.

  • I just realised that the error assertions were missing in the tests. Instead of _ = tpl.Execute(&b, nil), it should ideally be doing a nil assertion like: assert(t, "template failed", tpl.Execute(&b, nil), nil)
  • Too many commits. The nil assertions can all be squashed into a single commit.

Thanks!

@asahasrabuddhe
Copy link
Contributor Author

@knadh Will make necessary changes. Thanks!

explicitly ignore error for tpl.Execute
explicitly ignore error for os.Remove
explicitly ignore error for rand.Read()
use String method of bytes.Buffer instead of casting bytes to string
ignore error for http.ListenAndServe()
assert test errors and fix mock data to solve intermittently failing TestParseTemplateGlob
@asahasrabuddhe
Copy link
Contributor Author

@knadh Please review :)

@knadh knadh merged commit e45dc84 into knadh:master Jan 23, 2020
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.

2 participants