MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / NormalizePlatform

Function NormalizePlatform

internal/homeplugins/sync.go:92–106  ·  view source on GitHub ↗
(platform Platform)

Source from the content-addressed store, hash-verified

90}
91
92func NormalizePlatform(platform Platform) Platform {
93 goos := strings.ToLower(strings.TrimSpace(platform.GOOS))
94 switch goos {
95 case "mac", "macos", "osx":
96 goos = "darwin"
97 }
98 goarch := strings.ToLower(strings.TrimSpace(platform.GOARCH))
99 switch goarch {
100 case "x64", "x86_64":
101 goarch = "amd64"
102 case "aarch64":
103 goarch = "arm64"
104 }
105 return Platform{GOOS: goos, GOARCH: goarch}
106}
107
108func Sync(ctx context.Context, cfg *config.Config, pluginRuntime PluginRuntime) error {
109 _, errSync := SyncPlatformWithReport(ctx, cfg, pluginRuntime, CurrentPlatform())

Callers 2

SyncPlatformWithReportFunction · 0.85
newSyncReportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected