The golden rule doesn't originate with Christianity. It's found throughout the world's religious traditions and Jesus is paraphrasing a well known dictum of Hillel the Elder.