Use Zap Observer

If you are using zap as your logging tool, then when you write the tests, you might want to assert the function via the logs. You can use zap/observer package to make it possible.

Below is a code piece to demonstrate how it works:

Continue reading

Author's picture

kerkerj

Cat lover <3

Backend Engineer

Taiwan