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"
|
|
|
|
)
|
|
|
|
|
2024-08-13 09:33:52 +02:00
|
|
|
// 获取 macOS Rime 配置目录
|
|
|
|
func getRimeDirForPlatform() string {
|
|
|
|
u, err := user.Current()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalln(err)
|
2024-04-18 20:00:36 +02:00
|
|
|
}
|
2024-08-13 09:33:52 +02:00
|
|
|
return filepath.Join(u.HomeDir, "Library/Rime")
|
2024-04-18 20:00:36 +02:00
|
|
|
}
|