mirror of https://github.com/kidoman/embd
samples: defer pin close in gpio sample
This commit is contained in:
parent
1d33c3e3bb
commit
b16be3e0b1
|
@ -16,6 +16,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer led.Close()
|
||||
|
||||
if err := led.SetDirection(gpio.Out); err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Reference in New Issue