Skip to content

Commit

Permalink
合并文件后删除切片
Browse files Browse the repository at this point in the history
  • Loading branch information
lingen committed Jan 7, 2023
1 parent 1147999 commit 82c6c22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions file/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func CombineFile(fileList []string, target string) {
for _, name := range fileList {
chunk, _ := os.ReadFile(name)
chunkTotal = append(chunkTotal, chunk...)
os.Remove(name)
}
os.WriteFile(target, []byte(chunkTotal), os.ModePerm)
}
Expand Down

0 comments on commit 82c6c22

Please sign in to comment.