* Moving from govendor to dep. * Making the pull request template more friendly. * Fixing akward space in PR template. * goimports run on whole project using ` goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./gen-go/*")` source of command: https://gist.github.com/bgentry/fd1ffef7dbde01857f66
22 lines
350 B
Go
22 lines
350 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/samuel/go-zookeeper/zk"
|
|
)
|
|
|
|
func main() {
|
|
c, _, err := zk.Connect([]string{"127.0.0.1"}, time.Second) //*10)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
children, stat, ch, err := c.ChildrenW("/")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Printf("%+v %+v\n", children, stat)
|
|
e := <-ch
|
|
fmt.Printf("%+v\n", e)
|
|
}
|