修改代码注释为中文

This commit is contained in:
zyj
2026-03-04 14:10:30 +08:00
parent 89d64cb117
commit 2cb4e1a87b
16 changed files with 1031 additions and 69 deletions

View File

@@ -18,7 +18,7 @@ func NewDarwinPlatform() *DarwinPlatform {
}
func (p *DarwinPlatform) OS() string { return "darwin" }
func (p *DarwinPlatform) Arch() string { return "amd64" } // TODO: detect properly
func (p *DarwinPlatform) Arch() string { return "amd64" } // TODO: 正确检测架构
func (p *DarwinPlatform) HomeDir() string { return p.homeDir }
func (p *DarwinPlatform) ConfigDir() string {
@@ -34,13 +34,13 @@ func (p *DarwinPlatform) GetEnvVar(key string) string {
}
func (p *DarwinPlatform) SetEnvVar(ctx context.Context, key, value string) error {
// On macOS, set via launchctl and shell profile
// macOS 上通过 launchctl 和 Shell 配置文件设置
cmd := exec.CommandContext(ctx, "launchctl", "setenv", key, value)
return cmd.Run()
}
func (p *DarwinPlatform) AddToPath(ctx context.Context, dir string) error {
// TODO: Add to shell profile
// TODO: 添加到 Shell 配置文件
return nil
}