From cb984ab20eb13c1c8e6455fb1d935e2ada32d4ff Mon Sep 17 00:00:00 2001 From: tanganyu <569386693@qq.com> Date: Tue, 29 Dec 2020 11:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- write/write.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/write/write.go b/write/write.go index 6287aba..bd3629f 100644 --- a/write/write.go +++ b/write/write.go @@ -31,8 +31,6 @@ func RemoveFile() { defer wg.Done() defer func() { <-model.ControlCH }() if len(files) > 1 { - fmt.Printf("[INFO]: Remove the File hash: %s\n", hash) - fmt.Printf("[INFO]: List the Remove file:\n") for _, file := range files[1:] { var stat = true err := os.Remove(file) @@ -40,7 +38,7 @@ func RemoveFile() { fmt.Printf("[ERROR]: Remove File: %s : %s\n", file, err.Error()) stat = false } else { - fmt.Printf("[INFO]: ReMove: %s\n", file) + fmt.Printf("[INFO]: Remove File: %s\n", file) } rd := model.NewWrite(stat, hash, file, model.FileSize[hash]) model.RecordCH <- rd @@ -61,17 +59,14 @@ func CreateLink() { defer wg.Done() defer func() { <-model.ControlCH }() if len(files) > 1 { - fmt.Printf("[INFO]: Create the File Link hash: %s\n", hash) - fmt.Printf("[INFO]: Source File: %s\n", files[0]) - fmt.Printf("[INFO]: List the Create file:\n") for _, file := range files[1:] { var stat = true err := os.Link(files[0], file) if err != nil { stat = false - fmt.Printf("[ERROR]: Create File Link: %s : %s\n", file, err.Error()) + fmt.Printf("[ERROR]: Create File Link: %s : %s, Source File: %s\n", file, err.Error(), files[0]) } else { - fmt.Printf("[INFO]: LINK %s\n", file) + fmt.Printf("[INFO]: Create File Link %s\n", file) } rd := model.NewLink(stat, files[0], file) model.RecordCH <- rd