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

20 lines
285 B
Go
Raw Permalink Normal View History

2024-04-18 20:00:36 +02:00
//go:build darwin
// +build darwin
package rime
import (
"log"
2024-10-30 03:16:58 +01:00
"os/user"
2024-04-18 20:00:36 +02:00
"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
}