MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / LoadArch

Function LoadArch

core/utils/common/common.go:149–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147}
148
149func LoadArch() (string, error) {
150 std, err := cmd.NewCommandMgr().RunWithStdout("uname", "-a")
151 if err != nil {
152 return "", fmt.Errorf("std: %s, err: %s", std, err.Error())
153 }
154 return LoadArchWithStdout(std)
155}
156func LoadArchWithStdout(std string) (string, error) {
157 if strings.Contains(std, "x86_64") {
158 return "amd64", nil

Callers

nothing calls this directly

Calls 3

LoadArchWithStdoutFunction · 0.85
RunWithStdoutMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected