working commit
This commit is contained in:
+12
-12
@@ -27,7 +27,7 @@ import (
|
||||
|
||||
"mstore/pkg/client"
|
||||
"mstore/pkg/descr"
|
||||
"mstore/pkg/term"
|
||||
"mstore/pkg/terms"
|
||||
)
|
||||
|
||||
func (util *FileUtil) CreateFileCmds() *cobra.Command {
|
||||
@@ -341,11 +341,11 @@ func (util *FileUtil) listFiles(common *CommonFileParams, params *ListFilesParam
|
||||
var pathUsage string
|
||||
switch {
|
||||
case params.AsRegexp:
|
||||
pathUsage = term.AsRegexp
|
||||
pathUsage = terms.AsRegexp
|
||||
case params.AsPrefix:
|
||||
pathUsage = term.AsPrefix
|
||||
pathUsage = terms.AsPrefix
|
||||
default:
|
||||
pathUsage = term.AsFinePath
|
||||
pathUsage = terms.AsFinePath
|
||||
}
|
||||
timeout := time.Duration(common.Timeout) * time.Second
|
||||
ctx, _ := context.WithTimeout(context.Background(), timeout)
|
||||
@@ -467,11 +467,11 @@ func (util *FileUtil) exportFiles(common *CommonFileParams, params *ExportFilesP
|
||||
var pathUsage string
|
||||
switch {
|
||||
case params.AsRegexp:
|
||||
pathUsage = term.AsRegexp
|
||||
pathUsage = terms.AsRegexp
|
||||
case params.AsPrefix:
|
||||
pathUsage = term.AsPrefix
|
||||
pathUsage = terms.AsPrefix
|
||||
default:
|
||||
pathUsage = term.AsFinePath
|
||||
pathUsage = terms.AsFinePath
|
||||
}
|
||||
timeout := time.Duration(common.Timeout) * time.Second
|
||||
ctx, _ := context.WithTimeout(context.Background(), timeout)
|
||||
@@ -556,11 +556,11 @@ func (util *FileUtil) listCollections(common *CommonFileParams, params *ListColl
|
||||
var pathUsage string
|
||||
switch {
|
||||
case params.AsRegexp:
|
||||
pathUsage = term.AsRegexp
|
||||
pathUsage = terms.AsRegexp
|
||||
case params.AsPrefix:
|
||||
pathUsage = term.AsPrefix
|
||||
pathUsage = terms.AsPrefix
|
||||
default:
|
||||
pathUsage = term.AsFinePath
|
||||
pathUsage = terms.AsFinePath
|
||||
}
|
||||
timeout := time.Duration(common.Timeout) * time.Second
|
||||
ctx, _ := context.WithTimeout(context.Background(), timeout)
|
||||
@@ -606,9 +606,9 @@ func (util *FileUtil) deleteCollection(common *CommonFileParams, params *DeleteC
|
||||
var pathUsage string
|
||||
switch {
|
||||
case params.AsPrefix:
|
||||
pathUsage = term.AsPrefix
|
||||
pathUsage = terms.AsPrefix
|
||||
default:
|
||||
pathUsage = term.AsFinePath
|
||||
pathUsage = terms.AsFinePath
|
||||
}
|
||||
files, err := client.NewClient().DeleteCollection(ctx, params.Path, pathUsage, params.DryRun)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user