mirror of
https://github.com/golang/sys.git
synced 2026-02-09 12:16:04 +03:00
unix: remove unused stringsFromByteSlice for tests on aix
stringsFromByteSlice is only used in xattr_test.go which isn't enabled for aix. Change-Id: I95948cbac285d8efe7f5299de85625cb7541e906 Reviewed-on: https://go-review.googlesource.com/c/sys/+/177839 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
ad400b1274
commit
c432e742b0
@@ -166,17 +166,3 @@ func TestPselect(t *testing.T) {
|
||||
t.Errorf("Pselect: timeout should have been at least %v, got %v", dur, took)
|
||||
}
|
||||
}
|
||||
|
||||
// stringsFromByteSlice converts a sequence of attributes to a []string.
|
||||
// On Linux, each entry is a NULL-terminated string.
|
||||
func stringsFromByteSlice(buf []byte) []string {
|
||||
var result []string
|
||||
off := 0
|
||||
for i, b := range buf {
|
||||
if b == 0 {
|
||||
result = append(result, string(buf[off:i]))
|
||||
off = i + 1
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user