Skip to content

Commit 193c6ee

Browse files
author
eternal-flame-AD
committed
Rename ^Register.*Handler$ to ^Set.*Handler$
1 parent 3defd82 commit 193c6ee

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

messenger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ type MessageHandler struct {
1717
// Messenger is the interface plugins should implement to send messages.
1818
type Messenger interface {
1919
Plugin
20-
// RegisterMessageHandler is called every time the plugin is initialized. Plugins should record the handler and use the callbacks provided in the handler to send messages.
21-
RegisterMessageHandler(h MessageHandler)
20+
// SetMessageHandler is called every time the plugin is initialized. Plugins should record the handler and use the callbacks provided in the handler to send messages.
21+
SetMessageHandler(h MessageHandler)
2222
}

storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ type StorageHandler interface {
99
// Storager is the interface plugins should implement to use persistent storage.
1010
type Storager interface {
1111
Plugin
12-
RegisterStorageHandler(handler StorageHandler)
12+
SetStorageHandler(handler StorageHandler)
1313
}

v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package plugin
22

33
// Plugin is the interface every plugin need to implement
44
type Plugin interface {
5-
// Enable is called every time a plugin is started. Spawn custom goroutines here for polling, etc. It is always called after ^Register.*Handler$
5+
// Enable is called every time a plugin is started. Spawn custom goroutines here for polling, etc. It is always called after ^Set.*Handler$
66
Enable() error
77
// Disable is called every time a plugin is disabled. Plugins should stop all custom goroutines here.
88
Disable() error

0 commit comments

Comments
 (0)