Skip to content

Commit

Permalink
Minor cleanup, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Apr 8, 2022
1 parent f54032c commit c16d784
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
const (

// version is the current version
version = "v0.10.2"
version = "v0.10.3"

// defaultUserAgent is the default user agent for all requests
defaultUserAgent string = "go-whatsonchain: " + version
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestNewClient_CustomHTTPClient(t *testing.T) {
func ExampleNewClient() {
client := NewClient(NetworkTest, nil, nil)
fmt.Println(client.UserAgent())
// Output:go-whatsonchain: v0.10.2
// Output:go-whatsonchain: v0.10.3
}

// BenchmarkNewClient benchmarks the NewClient method
Expand Down
8 changes: 4 additions & 4 deletions websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ type SocketHandler interface {
OnConnect(*centrifuge.Client, centrifuge.ConnectEvent)
OnDisconnect(*centrifuge.Client, centrifuge.DisconnectEvent)
OnError(*centrifuge.Client, centrifuge.ErrorEvent)
OnJoin(*centrifuge.Subscription, centrifuge.JoinEvent)
OnLeave(*centrifuge.Subscription, centrifuge.LeaveEvent)
OnMessage(*centrifuge.Client, centrifuge.MessageEvent)
OnPublish(*centrifuge.Subscription, centrifuge.PublishEvent)
OnServerJoin(*centrifuge.Client, centrifuge.ServerJoinEvent)
OnServerLeave(*centrifuge.Client, centrifuge.ServerLeaveEvent)
OnServerPublish(*centrifuge.Client, centrifuge.ServerPublishEvent)
OnServerSubscribe(*centrifuge.Client, centrifuge.ServerSubscribeEvent)
OnServerUnsubscribe(*centrifuge.Client, centrifuge.ServerUnsubscribeEvent)
OnPublish(*centrifuge.Subscription, centrifuge.PublishEvent)
OnJoin(*centrifuge.Subscription, centrifuge.JoinEvent)
OnLeave(*centrifuge.Subscription, centrifuge.LeaveEvent)
OnSubscribeSuccess(*centrifuge.Subscription, centrifuge.SubscribeSuccessEvent)
OnSubscribeError(*centrifuge.Subscription, centrifuge.SubscribeErrorEvent)
OnSubscribeSuccess(*centrifuge.Subscription, centrifuge.SubscribeSuccessEvent)
OnUnsubscribe(*centrifuge.Subscription, centrifuge.UnsubscribeEvent)
}

Expand Down
31 changes: 13 additions & 18 deletions websocket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,29 @@ type testHandler struct {
HandlerName string
}

func (h *testHandler) OnPublish(subscription *centrifuge.Subscription, event centrifuge.PublishEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnPublish(*centrifuge.Subscription, centrifuge.PublishEvent) {
log.Printf("OnPublish")

}

func (h *testHandler) OnJoin(subscription *centrifuge.Subscription, event centrifuge.JoinEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnJoin(*centrifuge.Subscription, centrifuge.JoinEvent) {
log.Printf("OnJoin")
}

func (h *testHandler) OnLeave(subscription *centrifuge.Subscription, event centrifuge.LeaveEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnLeave(*centrifuge.Subscription, centrifuge.LeaveEvent) {
log.Printf("OnLeave")
}

func (h *testHandler) OnSubscribeSuccess(subscription *centrifuge.Subscription, event centrifuge.SubscribeSuccessEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnSubscribeSuccess(*centrifuge.Subscription, centrifuge.SubscribeSuccessEvent) {
log.Printf("OnSubscribeSuccess")
}

func (h *testHandler) OnSubscribeError(subscription *centrifuge.Subscription, event centrifuge.SubscribeErrorEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnSubscribeError(*centrifuge.Subscription, centrifuge.SubscribeErrorEvent) {
log.Printf("OnSubscribeError")
}

func (h *testHandler) OnUnsubscribe(subscription *centrifuge.Subscription, event centrifuge.UnsubscribeEvent) {
//TODO implement me
panic("implement me")
func (h *testHandler) OnUnsubscribe(*centrifuge.Subscription, centrifuge.UnsubscribeEvent) {
log.Printf("OnUnsubscribe")
}

func (h *testHandler) OnConnect(_ *centrifuge.Client, _ centrifuge.ConnectEvent) {
Expand Down

0 comments on commit c16d784

Please sign in to comment.