Ted

@SiliconRaven
3 Followers
57 Following
60 Posts
Linux enthusiast, Backend Developer with Go and and Python
https://blog.okello.ioBlog
https://github.com/kestroke3Github
I was working on a configuration loader library last night and came across a problem when testing where I needed to see the logs printed by the function being tested. Here's how I did it.
https://dev.to/keystroke3/how-to-read-a-functions-stdout-logs-in-go-tests-22d6
How to read a function's Stdout logs in Go tests

Being able to read the output of a function can be useful to read some good your tests are failing....

DEV Community
TIL #golang allows for named function return values. If the value is not explicitly set, then the nil version of its type will be returned. This is very useful for failed validations that return nil non-error values.