Files
weave-scope/common/marshal/marshal_linux_arm.go
2016-02-02 17:53:24 +00:00

16 lines
317 B
Go

package marshal
// FromUtsname reads the C-strings from syscall.Utsname and transforms them to Go
// strings
func FromUtsname(ca [65]uint8) 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])
}