update readme for new syntax

This commit is contained in:
Vishvananda Ishaya 2014-10-31 12:37:48 -07:00
parent 9c1aab3e9f
commit 2187ba67a2
1 changed files with 2 additions and 2 deletions

View File

@ -43,8 +43,8 @@ import (
)
func main() {
mybridge := &netlink.Link{Name: "mybridge", Type: "bridge"}
netlink, _ := netlink.LinkAdd(mybridge)
mybridge := &netlink.Bridge{netlink.LinkAttrs{Name: "foo"}}
_ := netlink.LinkAdd(mybridge)
eth1, _ := netlink.LinkByName("eth1")
netlink.LinkSetMaster(eth1, mybridge)
}