修改代码注释为中文
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user