Thanks for the reference to Yoda conditions. I hadn't heard of Yoda code until a few weeks ago when a Go linter complained about some code I wrote a few years ago. I realized I've been writing Yoda code in C/C++ for quite a while and that habit had continued (somewhat inconsistently) into Go programming. It's nice to skim through pages of code and see the value that will cause the computer to enter an if-block. The linter made me feel like Yoda code was somehow wrong. It's good to know that others think it can help in some situations.
First thing I thought of when I saw the original wrong code. I prefer the author's approach, though, as I do believe it is more clear, unless there is something performance critical about it that requires short-circuits for maximum efficiency.