Skip to content

Commit cfc7891

Browse files
committed
fix(Search): remove Printer and fix type
1 parent 1214619 commit cfc7891

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

internal/files/search.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,6 @@ func SearchFiles(cfg *config.Config, path string, resultChannel chan model.FileS
267267
resultsSplit := matchFlagWithDefaultValue(flagMatches, defaultValueMatches)
268268
combinedResults := append(resultsNotSplit, resultsSplit...)
269269

270-
res, _ := json.Marshal(combinedResults)
271-
fmt.Println(string(res))
272-
273270
resultChannel <- model.FileSearchResult{
274271
File: path,
275272
FileURL: getCodeURL(cfg, path, nil),

pkg/handler/extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func ExtractFlagsInfo(cfg *config.Config) ([]model.FileSearchResult, error) {
1818
filePaths, err := files.ListFiles(cfg.Directory, cfg.FilesToExclude)
1919

2020
if err != nil {
21-
log.Panicf("Error occured when listing files : %v", err)
21+
log.Panicf("Error occurred when listing files : %v", err)
2222
}
2323

2424
results := []model.FileSearchResult{}

pkg/handler/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func AnalyzeCode(cfg *config.Config) error {
1313
results, err := ExtractFlagsInfo(cfg)
1414

1515
if err != nil {
16-
log.Fatalf("Error occured when parsing code files: %v", err)
16+
log.Fatalf("Error occurred when parsing code files: %v", err)
1717
}
1818

1919
for _, r := range results {

0 commit comments

Comments
 (0)