diff --git a/batch-shovill-linux-amd64 b/batch-shovill-linux-amd64 index 4893de8..fa60f66 100755 Binary files a/batch-shovill-linux-amd64 and b/batch-shovill-linux-amd64 differ diff --git a/batch-shovill-mac-amd64 b/batch-shovill-mac-amd64 index f66d0b3..01342db 100755 Binary files a/batch-shovill-mac-amd64 and b/batch-shovill-mac-amd64 differ diff --git a/batch-shovill-windows-amd64 b/batch-shovill-windows-amd64 index d0ea41a..f897a8a 100755 Binary files a/batch-shovill-windows-amd64 and b/batch-shovill-windows-amd64 differ diff --git a/logfile.log b/logfile.log index 41a6bfb..656b5cb 100644 --- a/logfile.log +++ b/logfile.log @@ -1 +1,2 @@ -2021/05/29 22:27:43 shovill --trim --outdir /Users/xiao/go/src/gyy-shovill/out/A111 --force --R1 /Users/xiao/go/src/gyy-shovill/data/A111_1 --R2 /Users/xiao/go/src/gyy-shovill/data/A111_2 \ No newline at end of file +2022/11/24 09:40:26 shovill --trim --outdir /Users/xiao/Code/githubRepo/batch-shovill-assemblies/out/A111 --force --R1 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_1 --R2 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_2 2022/11/24 09:40:47 shovill --trim --outdir /Users/xiao/Code/githubRepo/batch-shovill-assemblies/out/A111 --force --R1 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_1 --R2 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_2 +2022/11/24 09:40:47 shovill --trim --outdir /Users/xiao/Code/githubRepo/batch-shovill-assemblies/out/A111 --force --R1 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_1 --R2 /Users/xiao/Code/githubRepo/batch-shovill-assemblies/data/A111_2 diff --git a/main.go b/main.go index 2b304d1..2dea2a6 100644 --- a/main.go +++ b/main.go @@ -41,6 +41,9 @@ func main() { if os.IsNotExist(err) { ret := getGenArray(outPutDirSeg, files) + if len(ret) != 2 { + continue + } file1 := ret[0] file2 := ret[1] @@ -125,7 +128,7 @@ func logger(logthis string) { } } - file, err := os.OpenFile(filePath, os.O_WRONLY | os.O_TRUNC, 0666) + file, err := os.OpenFile(filePath, os.O_WRONLY | os.O_APPEND, 0666) // file, err := os.OpenFile(filePath, os.O_WRONLY | os.O_APPEND, 0666) if err != nil { fmt.Printf("open file err=%v\n", err) @@ -136,7 +139,7 @@ func logger(logthis string) { now := time.Now() time := now.Format("2006/01/02 15:04:05") - str := fmt.Sprintf("%v %v ", time, logthis) + str := fmt.Sprintf("%v %v \n", time, logthis) writer := bufio.NewWriter(file) writer.WriteString(str)