Skip to content

Complete Test Coverage #8

Description

@anxielray

Hello @benbjohnson , I recently came across your article while trying to learn about how to test HTTP packages in Golang, and I think what you did was amazing.

What I found out

However, the test file content you provided was not fully testing all the scenarios in the function, as I ran the tests and it recorded an 83.3% coverage of the statements.

What I did

  • I then proceeded to try to generate the coverage file, and just as I suspected, the statement that had not been tested was the return nil part.

  • I added the test scenario, and now we have a complete 100% coverage on the test.

Conclusion

  • As I have seen some issues have been created and have stayed open for about half a decade now, I would like to know if it is still being maintained, to add my Pull request to the repository.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions