You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error when running exp2-watch.go from examples folder
# github.com/Shashwatsh/kite_example
./exp2-watch.go:25:21: undefined: kite.Event
./exp2-watch.go:30:13: k.WatchKites undefined (type *kite.Kite has no field or method WatchKites)
full code
import (
"fmt"
"log"
"math/rand"
"time"
"github.com/koding/kite"
"github.com/koding/kite/config"
"github.com/koding/kite/protocol"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
func main() {
// Create a kite
k := kite.New("exp2", "1.0.0")
k.Config = config.MustGet()
//k.Register(&url.URL{Scheme: "http", Host: "localhost:3636/kite"})
onEvent := func(e *kite.Event, err *kite.Error) {
fmt.Printf("e %+v\n", e)
fmt.Printf("err %+v\n", err)
}
_, err := k.WatchKites(protocol.KontrolQuery{
Username: k.Config.Username,
Environment: k.Config.Environment,
Name: "math",
// ID: "48bb002b-79f6-4a4e-6bba-a40567a08b6c",
}, onEvent)
if err != nil {
log.Fatalln(err)
}
// This is a bad example, it's just for testing the watch functionality :)
fmt.Println("listening to events")
select {}
}
The text was updated successfully, but these errors were encountered:
I'm getting this error when running
exp2-watch.go
from examples folderfull code
The text was updated successfully, but these errors were encountered: