1
0
mirror of https://github.com/kidoman/embd synced 2025-04-18 07:58:29 +02:00

samples: defer pin close in gpio sample

This commit is contained in:
Karan Misra 2014-03-02 12:21:49 +05:30
parent 1d33c3e3bb
commit b16be3e0b1

View File

@ -16,6 +16,7 @@ func main() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
defer led.Close()
if err := led.SetDirection(gpio.Out); err != nil { if err := led.SetDirection(gpio.Out); err != nil {
panic(err) panic(err)