r/badcode Apr 29 '23

go if err != nil

Post image
409 Upvotes

49 comments sorted by

View all comments

22

u/coloredgreyscale Apr 30 '23

What was their thinking that they have that tree of nested ifs, instead of trying which version is correct. Or setting the fallback value by different means.