Suppression des print innutiles

This commit is contained in:
Benjamin 2022-03-20 15:32:45 +01:00
parent 52032b5676
commit ca9dd538e3
6 changed files with 4 additions and 22 deletions

View File

@ -87,10 +87,6 @@ func main() {
requestManager := managers.RequestManager{Repository: protocolRepository}
server := network.ServerUnicast{Network: "tcp", Port: appConfig.UnicastPort, ReqManager: &requestManager}
server.Run() // TODO : -> pourquoi ne pas partir dans un thread ici.
server.Run()
//reader := bufio.NewReader(os.Stdin) TODO ne pas oublier ici de mettre en place un point de sortie pour le programme.
//fmt.Print("Type Enter to quite: ")
//cmd, _ := reader.ReadString('\n')
//println(cmd)
}

View File

@ -23,7 +23,7 @@ func (server ServerUnicast) Run() {
// Attente connexion du FileFrontEnd
con, err := listen.Accept()
print("connection ok")
print("Connecté au FFE")
if err != nil {
fmt.Printf("Error while accepting client : %s\n", err)

View File

@ -43,7 +43,7 @@ func (rule SendFileRule) GetCmd() string {
// Execute the Rule with a string command.
func (rule SendFileRule) Execute(data string) (*protocol.ProtocolWriterResult, func(reader *bufio.Reader) *protocol.ProtocolWriterResult) {
println(0)
if rule.Match(data) { // TODO : cloture this command.
values := rule.matcher.Parse(data)

View File

@ -36,10 +36,3 @@ func (rule EraseOkRule) Execute(argsData ...string) *protocol.ProtocolWriterResu
Cmd: buildedCmd,
}
}
/*
func onWrite(writer *bufio.Writer) {
println("Ecriture du fichier sur le réseau")
}
*/

View File

@ -36,10 +36,3 @@ func (rule SendErrorRule) Execute(argsData ...string) *protocol.ProtocolWriterRe
Cmd: buildedCmd,
}
}
/*
func onWrite(writer *bufio.Writer) {
println("Ecriture du fichier sur le réseau")
}
*/

View File

@ -45,7 +45,7 @@ func HashFileCompare(filePath string, fingerprint string) (bool, error) {
if err != nil {
return false, err
}
println("OKOK ", fileFingerprint, fingerprint)
if strings.Compare(fileFingerprint, fingerprint) == 0 {
return true, nil
}