forked from p53841790/wheat-cache
27 lines
402 B
Go
27 lines
402 B
Go
package mockplugin
|
|
|
|
import "fmt"
|
|
|
|
type MockPlugin struct {
|
|
}
|
|
|
|
func (m *MockPlugin) Init() {
|
|
}
|
|
|
|
func (m *MockPlugin) Exec(msg interface{}) (interface{}, error) {
|
|
fmt.Println(msg)
|
|
return nil, nil
|
|
}
|
|
|
|
func (m *MockPlugin) Name() string {
|
|
return "mock-plugins"
|
|
}
|
|
|
|
func (m *MockPlugin) Describe() string {
|
|
return "这是一个测试用的插件"
|
|
}
|
|
|
|
func NewPlugin() *MockPlugin {
|
|
return &MockPlugin{}
|
|
}
|