tinygo
tinygo copied to clipboard
feat(os): add UserConfigDir and UserCacheDir
Fixes #5040
@mikesmitty looks like this needs to be behind a build tag since those functions do not exist in older Go versions.
internal/filepathlite was added in Go 1.23, so we can't rely on it.
We could, however, have our own internal/filepathlite package instead. For that you'd need to modify the following code to add the package as well:
https://github.com/tinygo-org/tinygo/blob/3869f76887feef6c444308e7e1531b7cac1bbd10/loader/goroot.go#L245
(Add "internal/filepathlite": false,, and preferably also a note to the files like "This is needed for Go 1.22 compatibility").