MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / GetClientPlatformFromOsArchStr

Function GetClientPlatformFromOsArchStr

pkg/remote/connutil.go:80–90  ·  view source on GitHub ↗
(ctx context.Context, osArchStr string)

Source from the content-addressed store, hash-verified

78}
79
80func GetClientPlatformFromOsArchStr(ctx context.Context, osArchStr string) (string, string, error) {
81 parts := strings.Fields(strings.TrimSpace(osArchStr))
82 if len(parts) != 2 {
83 return "", "", fmt.Errorf("unexpected output from uname: %s", osArchStr)
84 }
85 os, arch := normalizeOs(parts[0]), normalizeArch(parts[1])
86 if err := wavebase.ValidateWshSupportedArch(os, arch); err != nil {
87 return "", "", err
88 }
89 return os, arch, nil
90}
91
92var installTemplateRawDefault = strings.TrimSpace(`
93mkdir -p {{.installDir}} || exit 1;

Callers 1

InstallWshMethod · 0.92

Calls 3

ValidateWshSupportedArchFunction · 0.92
normalizeOsFunction · 0.70
normalizeArchFunction · 0.70

Tested by

no test coverage detected