Fix example in README.md

This commit is contained in:
Dave Pifke 2017-05-25 12:52:43 -07:00
parent 2928b06b23
commit 84869f0e2c
No known key found for this signature in database
GPG Key ID: 3685742996D9D533

View File

@ -19,7 +19,10 @@ import (
)
// Prints the BSSID (MAC address) and SSID of each access point in range:
w := wpasupplicant.Unixgram("wlan0")
w, err := wpasupplicant.Unixgram("wlan0")
if err != nil {
panic(err)
}
for _, bss := range w.ScanResults() {
fmt.Fprintf("%s\t%s\n", bss.BSSID(), bss.SSID())
}