Stop unnecessary panic
This commit is contained in:
parent
586e3d2010
commit
4cbe2d8e67
7
main.go
7
main.go
@ -130,6 +130,11 @@ func main() {
|
|||||||
|
|
||||||
r, _, err = stdin.ReadRune()
|
r, _, err = stdin.ReadRune()
|
||||||
fmt.Printf("%s\n", string(r))
|
fmt.Printf("%s\n", string(r))
|
||||||
|
|
||||||
|
if err == io.EOF {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -141,7 +146,7 @@ func main() {
|
|||||||
Press([8]byte{flag, 0, report[0], report[1], report[2], report[3], report[4], report[5]}, hidg0)
|
Press([8]byte{flag, 0, report[0], report[1], report[2], report[3], report[4], report[5]}, hidg0)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
fmt.Println("Success!")
|
||||||
hidg0.Close()
|
hidg0.Close()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user