Some changes I had locally (got some more, but in a follow-up) :smile:
move digest tests to root
These tests have to be in their own package to prevent a circular import
between testdigest and the main module, but Go allows for blackbox-testing
by using a "_test" package.
This patch:
moves the test file to be next to the implementation.
removes the redundant imports of "crypto/sha256" and "crypto/shasha512",
as they are imported by default since 084376bb543d4ce80b030a77a6f51f3b3fd861dc
TestFroms: fix some linting issues
Keep the linters happy:
fix an unhandled error (but unlikely to happen)
fix some variables being shadowed
TestFroms: use sub-tests
Use sub-tests to not fail early if an algorithm fails.
With this change:
=== RUN TestFroms
=== RUN TestFroms/sha256
=== RUN TestFroms/sha384
=== RUN TestFroms/sha512
--- PASS: TestFroms (0.02s)
--- PASS: TestFroms/sha256 (0.01s)
--- PASS: TestFroms/sha384 (0.00s)
--- PASS: TestFroms/sha512 (0.00s)
PASS
Some changes I had locally (got some more, but in a follow-up) :smile:
move digest tests to root
These tests have to be in their own package to prevent a circular import between testdigest and the main module, but Go allows for blackbox-testing by using a "_test" package.
This patch:
TestFroms: fix some linting issues
Keep the linters happy:
TestFroms: use sub-tests
Use sub-tests to not fail early if an algorithm fails.
With this change:
gofmt, and touch-up some godoc