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()
|
||||
fmt.Printf("%s\n", string(r))
|
||||
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
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)
|
||||
|
||||
}
|
||||
|
||||
fmt.Println("Success!")
|
||||
hidg0.Close()
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user