I have a struct which contains an internal Logger – should functions still return errors?

Written by
Link to Post

https://www.reddit.com/r/golang/comments/adi96g/i_have_a_struct_which_contains_an_internal_logger/

As per title, I have a simple struct that write a log to a file for updating internal status of various things. If an error occurs during this process should the function running the code return an error, or is it kosher to handle this logging internally and just return a boolean on whether the function was successful or not? The error isn’t really important outside of this function

submitted by /u/sc3nner
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply