Hi,
I have quite decent experience with GoLang, however the way we should go about this task is different than presented. It is not an accepted practice to ask for user's password for third party services, instead, the application you need (the middle man) needs to be authorized by user to access their data on third party services.
Both services, Office365 and Google, have API endpoints that can handle this kind of communication, and many more applications.
Looking forward to hearing from you!
Kind regards,
Tijana