From ee9c96d609a0b5c5ad04ed0171a139a6263a3d3c Mon Sep 17 00:00:00 2001 From: Song Gao Date: Sun, 22 Jan 2017 17:49:06 -0800 Subject: [PATCH] Update README.md (resolves #16) --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 291720a..072ce71 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ See https://github.com/songgao/packets for functions for parsing various packets ## Supported Platforms * Linux -* Windows +* Windows (experimental; APIs might change) * macOS (point-to-point TUN only) ## Installation @@ -42,7 +42,12 @@ import ( ) func main() { - ifce, err := water.NewTAP("O_O") + config := water.Config{ + DeviceType: water.TAP, + } + config.Name = "O_O" + + ifce, err := water.New(config) if err != nil { log.Fatal(err) } @@ -101,7 +106,9 @@ import ( ) func main() { - ifce, err := water.NewTUN("") + ifce, err := water.New(water.Config{ + DeviceType: water.TUN, + }) if err != nil { log.Fatal(err) } @@ -161,7 +168,9 @@ import ( ) func main() { - ifce, err := water.NewTAP("O_O") + ifce, err := water.New(water.Config{ + DeviceType: water.TAP, + }) if err != nil { log.Fatal(err) }