Well, there is also a testing.Errorf that does something close to this so I guess it is ok.