The sayings of our beloved Prophet Muhammad (blessings and peace be upon him)
"All the sins of my followers will be forgiven except those which are disclosed to the people. For example a person commits a sin at night and though Allah screens it from the public, in the morning he says. “O so-and-so, I did such-and-such evil deed"
Sahih Bukhari Hadith No. 980 Book 78, Chapter 60 Narrated by Hazrat Ibn ‘Umar (r.a.)