feat: windows app update

This commit is contained in:
Simon Ding
2025-04-29 18:54:56 +08:00
parent 3a73d0c33e
commit 5375f66018
14 changed files with 63 additions and 25 deletions

21
pkg/utils/dir_lib.go Normal file
View File

@@ -0,0 +1,21 @@
//go:build lib
package utils
import (
"os"
"path/filepath"
)
func GetUserDataDir() string {
d, err := os.UserHomeDir()
if err != nil {
panic(err)
}
d = filepath.Join(d, ".polaris")
if _, err := os.Stat(d); os.IsNotExist(err) {
os.MkdirAll(d, os.ModePerm)
}
return d
}