mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-02 21:27:15 +08:00
remove useless code
This commit is contained in:
parent
a9f9f18f09
commit
1f10f1e982
@ -85,9 +85,7 @@ func RunCopy(driveId string, paths ...string) {
|
|||||||
|
|
||||||
failedCopyFiles := []*aliyunpan.FileEntity{}
|
failedCopyFiles := []*aliyunpan.FileEntity{}
|
||||||
successCopyFiles := []*aliyunpan.FileEntity{}
|
successCopyFiles := []*aliyunpan.FileEntity{}
|
||||||
fileId2FileEntity := map[string]*aliyunpan.FileEntity{}
|
|
||||||
for _, mfi := range opFileList {
|
for _, mfi := range opFileList {
|
||||||
fileId2FileEntity[mfi.FileId] = mfi
|
|
||||||
_, er := activeUser.PanClient().OpenapiPanClient().FileCopy(&aliyunpan.FileCopyParam{
|
_, er := activeUser.PanClient().OpenapiPanClient().FileCopy(&aliyunpan.FileCopyParam{
|
||||||
DriveId: driveId,
|
DriveId: driveId,
|
||||||
FileId: mfi.FileId,
|
FileId: mfi.FileId,
|
||||||
@ -103,7 +101,7 @@ func RunCopy(driveId string, paths ...string) {
|
|||||||
if len(failedCopyFiles) > 0 {
|
if len(failedCopyFiles) > 0 {
|
||||||
fmt.Println("以下文件复制失败:")
|
fmt.Println("以下文件复制失败:")
|
||||||
for _, f := range failedCopyFiles {
|
for _, f := range failedCopyFiles {
|
||||||
fmt.Println(f.FileName)
|
fmt.Println(f.Path)
|
||||||
}
|
}
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
}
|
}
|
||||||
@ -112,7 +110,7 @@ func RunCopy(driveId string, paths ...string) {
|
|||||||
tb := cmdtable.NewTable(os.Stdout)
|
tb := cmdtable.NewTable(os.Stdout)
|
||||||
tb.SetHeader([]string{"#", "文件/目录"})
|
tb.SetHeader([]string{"#", "文件/目录"})
|
||||||
for k, rs := range successCopyFiles {
|
for k, rs := range successCopyFiles {
|
||||||
tb.Append([]string{strconv.Itoa(k + 1), fileId2FileEntity[rs.FileId].Path})
|
tb.Append([]string{strconv.Itoa(k + 1), rs.Path})
|
||||||
}
|
}
|
||||||
tb.Render()
|
tb.Render()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user