Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1277209

Browse files
committed
feat: create cloc dir
1 parenta9b47cb commit1277209

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎cmd/cloc.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var clocCmd = &cobra.Command{
4242
dirs =append(dirs, filepath.FromSlash(args[0] +"/" + f.Name()))
4343
}
4444
}
45-
os.Mkdir(config.CocaConfig.ReporterPath +"/cloc/", os.ModePerm)
45+
createClocDir()
4646

4747
processor.Format ="json"
4848

@@ -63,6 +63,10 @@ var clocCmd = &cobra.Command{
6363
},
6464
}
6565

66+
funccreateClocDir() error {
67+
return os.Mkdir(config.CocaConfig.ReporterPath+"/cloc/", os.ModePerm)
68+
}
69+
6670
funcprocess_dirs(dirs []string) []string {
6771
var outputFiles []string
6872

‎cmd/config/cmd_config.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ package config
22

33
typeTypeCocaConfigstruct {
44
ReporterPathstring
5+
ClocDirstring
56
}
67

78
varCocaConfig=&TypeCocaConfig{
89
ReporterPath:"coca_reporter",
10+
ClocDir:"/cloc",
911
}
1012

1113
constVERSION="2.0.0"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp