Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the user’s home directory by user.Current().HomeDir. Maybe that’s overkill, I have to check the XDG spec.
But I’m definitely missing os.UserDataDir(). That’s a bummer.