We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12b73a8 commit f7149d9Copy full SHA for f7149d9
main.go
@@ -57,6 +57,7 @@ func listDevices() (ds []Device, err error) {
57
}
58
re := regexp.MustCompile(`(?m)^([^\s]+)\s+(device|offline|unauthorized)\s*$`)
59
matches := re.FindAllStringSubmatch(string(output), -1)
60
+ ds = make([]Device, 0, len(matches))
61
for _, m := range matches {
62
status := m[2]
63
ds = append(ds, Device{
0 commit comments