File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
- package main
1
+ package cli
2
2
3
3
import (
4
4
"flag"
@@ -10,8 +10,8 @@ import (
10
10
11
11
// CLI is for DI
12
12
type CLI struct {
13
- dirPath imgcnv.DirPath
14
- imageFactory imgcnv.ImageFileFactory
13
+ DirPath imgcnv.DirPath
14
+ ImageFactory imgcnv.ImageFileFactory
15
15
}
16
16
17
17
// Execute executes this app according to options
@@ -43,13 +43,13 @@ func (cli *CLI) Execute(args []string) error {
43
43
outputDir = inputDir
44
44
}
45
45
46
- paths , err := cli .dirPath .AllFilePaths (inputDir , * inputExt )
46
+ paths , err := cli .DirPath .AllFilePaths (inputDir , * inputExt )
47
47
if err != nil {
48
48
return err
49
49
}
50
50
51
51
for _ , path := range paths {
52
- img , err := cli .imageFactory .Create (path )
52
+ img , err := cli .ImageFactory .Create (path )
53
53
if err != nil {
54
54
return err
55
55
}
Original file line number Diff line number Diff line change 1
- package main
1
+ package cli
2
2
3
3
import (
4
4
"path/filepath"
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ package main
3
3
import (
4
4
"os"
5
5
6
+ "github.com/gopherdojo/dojo6/kadai2/en-ken/cli"
6
7
"github.com/gopherdojo/dojo6/kadai2/en-ken/imgcnv"
7
8
)
8
9
9
10
func main () {
10
11
dirPath := imgcnv .NewDirPath ()
11
12
factory := imgcnv .NewImageFileFactory ()
12
- cli := & CLI {
13
- dirPath : dirPath ,
14
- imageFactory : factory ,
13
+ cli := & cli. CLI {
14
+ DirPath : dirPath ,
15
+ ImageFactory : factory ,
15
16
}
16
17
17
18
cli .Execute (os .Args )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments