mirror of
https://github.com/kidoman/embd
synced 2024-12-22 04:40:04 +01:00
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…
x
Reference in New Issue
Block a user