22 lines
368 B
Go
22 lines
368 B
Go
package rules
|
|
|
|
import "_StorBackEnd/pkg/protocol"
|
|
|
|
type HelloRule struct {
|
|
cmd string
|
|
matcher *protocol.RegexMatcher
|
|
}
|
|
|
|
func Create(cmd string, pattern string) *HelloRule {
|
|
h := new(HelloRule)
|
|
h.cmd = cmd
|
|
h.matcher = protocol.CreateRegexMatcher(pattern)
|
|
|
|
return h
|
|
}
|
|
|
|
func (rule HelloRule) execute(data string) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|