()
| 20 | } |
| 21 | |
| 22 | func main() { |
| 23 | // Create a kite |
| 24 | k := kite.New("exp2", "1.0.0") |
| 25 | k.Config = config.MustGet() |
| 26 | |
| 27 | onEvent := func(e *kite.Event, err *kite.Error) { |
| 28 | fmt.Printf("e %+v\n", e) |
| 29 | fmt.Printf("err %+v\n", err) |
| 30 | } |
| 31 | |
| 32 | _, err := k.WatchKites(protocol.KontrolQuery{ |
| 33 | Username: k.Config.Username, |
| 34 | Environment: k.Config.Environment, |
| 35 | Name: "math", |
| 36 | // ID: "48bb002b-79f6-4a4e-6bba-a40567a08b6c", |
| 37 | }, onEvent) |
| 38 | if err != nil { |
| 39 | log.Fatalln(err) |
| 40 | } |
| 41 | |
| 42 | // This is a bad example, it's just for testing the watch functionality :) |
| 43 | fmt.Println("listening to events") |
| 44 | |
| 45 | select {} |
| 46 | } |
nothing calls this directly
no outgoing calls
no test coverage detected