Fixing some issues, backed project study
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package protocol
|
||||
|
||||
// IProtocolReader Représentation abstraite d'un protocol
|
||||
// IProtocolWriter Représentation abstraite d'un protocol
|
||||
type IProtocolWriter interface {
|
||||
// GetCmd Permet de récupérer le nom de la commande
|
||||
GetCmd() string
|
||||
|
||||
@@ -8,7 +8,6 @@ func CreateRegexMatcher(pattern string) *RegexMatcher {
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &RegexMatcher{matcher: compile}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,6 @@ func (receiver RequestManager) Execute(request string) string {
|
||||
return result
|
||||
} else {
|
||||
// TODO : Renvoyer qu'une erreur est survenue
|
||||
return "Error occured while execute command"
|
||||
return "Error occurred while execute command"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ func (repo ProtocolRepository) ExecuteReader(data string) (string, bool) {
|
||||
return (*reader).Execute(data)
|
||||
}
|
||||
}
|
||||
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ func (rule EraseFileRule) GetCmd() string {
|
||||
}
|
||||
|
||||
func (rule EraseFileRule) Execute(data string) (string, bool) {
|
||||
|
||||
if rule.Match(data) {
|
||||
values := rule.matcher.Parse(data)
|
||||
println(values[1], " est le hash du fichier à supprimer")
|
||||
|
||||
Reference in New Issue
Block a user