Implémentation de l'interface IProtocolWriter.go dans la règle HelloRule.go

This commit is contained in:
2022-02-22 08:47:03 +01:00
parent 5c76801854
commit 9a7da75ec8
3 changed files with 35 additions and 3 deletions

View File

@@ -7,7 +7,6 @@ const EraseFileRuleName = "ffe_erasefile"
// EraseFileRule Demande de suppression d'un fichier
type EraseFileRule struct {
protocol.IProtocolReader
// Cmd Nom de la règle
Cmd string
@@ -23,6 +22,10 @@ func CreateEraseFileRule(pattern string) *EraseFileRule {
}
}
func (rule EraseFileRule) GetCmd() string {
return rule.Cmd
}
func (rule EraseFileRule) Execute(data string) string {
if rule.Match(data) {