Package flag was checked
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package main
|
||||
|
||||
import "github.com/dedkovd/noolite"
|
||||
import (
|
||||
"flag"
|
||||
"github.com/dedkovd/noolite"
|
||||
)
|
||||
|
||||
func main() {
|
||||
n, err := noolite.DefaultNooliteAdapter()
|
||||
@@ -11,7 +14,9 @@ func main() {
|
||||
|
||||
defer n.Close()
|
||||
|
||||
err = n.Switch(7)
|
||||
channel := flag.Int("c", nil, "Noolite adapter channel")
|
||||
|
||||
err = n.Switch(channel)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user