On cases with . isn’t a *resource.Image i get an error when .Fill is for example executed on a string. The error itself maybe correct, but with this condition set, .Fill shouldn’t be executed.
If i rewrite this with if-else everything is working fine.
No, it seems that if delimits actual blocks that are executed or not depending on the condition, while cond parses the possible outcomes at the same time it evaluates the condition (that’s because that’s how Go templates work).