Perhaps taking a Kantian angle on the golden rule would help. Kant's formulation of the categorical imperative has often been likened to a formalization of the golden rule. On a Kantian deontology, your deliberation would look something like this.
I will act on the maxim that, when I know of a crime committed by a friend, I will not report that crime. Now universalize the maxim: Everyone will act on the maxim that, when he knows of a crime committed by a friend, he will not report that crime. What would the world be like if this were instituted and necessarily occurred as a law of nature?
First, we ask ourselves: is such a world logically possible? It seems that there is no internal contradiction here. What we'd get is a world where there were more criminals roaming free, but nothing seems logically contradictory about that. Indeed, there is nothing logically contradictory even the extreme case of all criminals roaming free.
However, next we need to ask ourselves if it contradicts the nature of a self-determining will to choose to be a member of a world where justice is not served whenever it should be. And it seems that here we find the contradiction. It would be irrational to choose to be a member of a world where people don't report crimes that they know of, because the self-determining will is one that seeks to live in a world of respect and dignity.
Thus, I cannot make an exception of myself. Even if I were inclined not to report a friend, this inclination would lead me astray from the moral duty to report crimes. In this sense, doing unto others as one would have done unto oneself would imply that I should report the crime.