1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 12:50:19 +01: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 {
panic(err)
}
defer led.Close()
if err := led.SetDirection(gpio.Out); err != nil {
panic(err)