I want to store some files in appdata path, but I don't know how to get it in Go.
There are already functions for this in the os package, see here for reference:
package main
func main() {
os.UserHomeDir() // C:\Users\YourUser
os.UserCacheDir() // C:\Users\YourUser\AppData\Local
os.UserConfigDir() // C:\Users\YourUser\AppData\Roaming
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With