File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
kadai1/tanaka0325/imgconv Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,8 @@ func Run(options Options, args Args) error {
16
16
return err
17
17
}
18
18
19
- // get target image paths from args
20
- udns := args .uniq ()
21
- paths , err := getPaths (udns , * options .From )
19
+ // get target image flepaths from args
20
+ paths , err := getTargetFilePaths (args , * options .From )
22
21
if err != nil {
23
22
return err
24
23
}
@@ -45,11 +44,12 @@ func Run(options Options, args Args) error {
45
44
return nil
46
45
}
47
46
48
- func getPaths (dns []string , from string ) ([]string , error ) {
47
+ func getTargetFilePaths (args Args , from string ) ([]string , error ) {
48
+ uns := args .uniq ()
49
49
paths := []string {}
50
50
51
- for _ , dn := range dns {
52
- if err := filepath .Walk (dn , func (path string , info os.FileInfo , err error ) error {
51
+ for _ , n := range uns {
52
+ if err := filepath .Walk (n , func (path string , info os.FileInfo , err error ) error {
53
53
if filepath .Ext (path ) == "." + from {
54
54
paths = append (paths , path )
55
55
}
You can’t perform that action at this time.
0 commit comments