blob: 8d4ca93d1555a7190ceb67b0fea74e49448934fa [file] [log] [blame]
package netconfig_test
import (
"fmt"
"log"
"v.io/x/lib/netconfig"
)
func ExampleNetConfigWatcher() {
w, err := netconfig.NewNetConfigWatcher()
if err != nil {
log.Fatalf("oops: %s", err)
}
fmt.Println("Do something to your network. You should see one or more dings.")
for {
<-w.Channel()
fmt.Println("ding")
}
}