From 5bf30ed95f024d42369459c9d6069bb51ab765b8 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 14 Nov 2017 18:29:04 +1300 Subject: [PATCH] update examples for StateChange member API change --- Example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example_test.go b/Example_test.go index deb0550..1bc54d3 100644 --- a/Example_test.go +++ b/Example_test.go @@ -15,7 +15,7 @@ func ExampleHubConnectionOptions_Connect() { event := <-hub.OnEvent switch event.EventType { case EVENT_CONNECTION_STATE_CHANGED: - fmt.Printf("Connection -- %s (%s)\n", event.StateChange.Format(), event.Message) + fmt.Printf("Connection -- %s (%s)\n", event.StateChange, event.Message) case EVENT_PUBLIC: fmt.Printf("Message from '%s': '%s'\n", event.Nick, event.Message) @@ -34,7 +34,7 @@ func ExampleHubConnectionOptions_ConnectSync() { cb := func(hub *HubConnection, event HubEvent) { switch event.EventType { case EVENT_CONNECTION_STATE_CHANGED: - fmt.Printf("Connection -- %s (%s)\n", event.StateChange.Format(), event.Message) + fmt.Printf("Connection -- %s (%s)\n", event.StateChange, event.Message) case EVENT_PUBLIC: fmt.Printf("Message from '%s': '%s'\n", event.Nick, event.Message)