rime-ice/others/script/rime/dir_mac.go

19 lines
274 B
Go
Raw Normal View History

2024-04-18 20:00:36 +02:00
//go:build darwin
// +build darwin
package rime
import (
"log"
"path/filepath"
)
// 获取 macOS Rime 配置目录
func getRimeDirForPlatform() string {
u, err := user.Current()
if err != nil {
log.Fatalln(err)
2024-04-18 20:00:36 +02:00
}
return filepath.Join(u.HomeDir, "Library/Rime")
2024-04-18 20:00:36 +02:00
}