Lately I had the need for storing SMTP credentials somewhere on the system to be used for a small Go application that would automatically send mails to administrators in case, a certain ETW event would have fired. The solution on Windows is to use the windows Credential Manager. On Linux you could use pass.
I needed both solutions for Go and C#.
In Go it's pretty simple as Daniel Joos already wrote a nice package for exactly that purpose. You can get it here: