The Golden Rule shows up in many different religions and ethical systems. Christianity states it this way: “And as ye would that men should do to you, do ye also to them likewise.” -Luke 6:31
Confucianism, Buddhism, and Hinduism state it in the negative; basically, don’t do things to others that you yourself would find hateful. Most other religions have some form of this, as well. I think we can all agree that it’s a worthy rule to live by.
George Bernard Shaw, however, pointed out a flaw. He said, “Do not do unto others as you would that they should do unto you. Their tastes may not be the same.” A better law might be to treat people as they would like to be treated, rather than as you would like to be treated. This is harder work, because it requires a greater level of understanding and compassion.