Move charsToString to architecture dependent source to fix casting problem
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
This commit is contained in:
parent
5edb94d724
commit
0c54d58fea
3 changed files with 36 additions and 12 deletions
|
@ -14,15 +14,3 @@ func GetRuntimeArchitecture() (string, error) {
|
|||
}
|
||||
return charsToString(utsname.Machine), nil
|
||||
}
|
||||
|
||||
func charsToString(ca [65]int8) string {
|
||||
s := make([]byte, len(ca))
|
||||
var lens int
|
||||
for ; lens < len(ca); lens++ {
|
||||
if ca[lens] == 0 {
|
||||
break
|
||||
}
|
||||
s[lens] = uint8(ca[lens])
|
||||
}
|
||||
return string(s[0:lens])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue