Fixing some issues, backed project study

This commit is contained in:
2022-03-05 18:32:27 +01:00
parent b942166f69
commit 8c443d43e4
10 changed files with 15 additions and 18 deletions

View File

@@ -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

View File

@@ -8,7 +8,6 @@ func CreateRegexMatcher(pattern string) *RegexMatcher {
if err != nil {
return nil
}
return &RegexMatcher{matcher: compile}
}

View File

@@ -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"
}
}

View File

@@ -42,7 +42,6 @@ func (repo ProtocolRepository) ExecuteReader(data string) (string, bool) {
return (*reader).Execute(data)
}
}
return "", false
}

View File

@@ -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")