Moody's Corp., one of the big three ratings agencies, said in a regulatory filing that longtime general counsel John Goggins is retiring after almost two and a half decades with the New York City-based company.