Add String() method to Topic.

This commit is contained in:
Louis Thibault 2020-08-03 13:35:12 +02:00 committed by vyzo
parent 769831b478
commit c5ece1d0c7
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,11 @@ type Topic struct {
closed bool closed bool
} }
// String returns the topic associated with t
func (t *Topic) String() string {
return t.topic
}
// EventHandler creates a handle for topic specific events // EventHandler creates a handle for topic specific events
// Multiple event handlers may be created and will operate independently of each other // Multiple event handlers may be created and will operate independently of each other
func (t *Topic) EventHandler(opts ...TopicEventHandlerOpt) (*TopicEventHandler, error) { func (t *Topic) EventHandler(opts ...TopicEventHandlerOpt) (*TopicEventHandler, error) {