Skip to content

Commit b617f64

Browse files
committed
Enhance the output format again
1 parent 59f6603 commit b617f64

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cmd/namigo/main.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,32 @@ func main() {
9393

9494
time.Sleep(500 * time.Millisecond)
9595

96+
fmt.Printf("%d Golang results found. First %d are:\n", len(ptf.results.golang), maxResultsToPrint)
9697
for i, res := range ptf.results.golang {
9798
if i >= maxResultsToPrint {
9899
break
99100
}
100-
content := fmt.Sprintf("[golang] %s %s ->\n\t%s", res.Name, res.Path, res.Description)
101+
content := fmt.Sprintf("\t[golang] %s %s ->\n\t\t%s", res.Name, res.Path, res.Description)
101102
fmt.Println(content)
102103
}
104+
fmt.Println()
103105

106+
fmt.Printf("%d NPM results found. First %d are:\n", len(ptf.results.npm), maxResultsToPrint)
104107
for i, res := range ptf.results.npm {
105108
if i >= maxResultsToPrint {
106109
break
107110
}
108-
content := fmt.Sprintf("[npm] %s [exact=%v] ->\n\t%s", res.Name, res.IsExactMatch, res.Description)
111+
content := fmt.Sprintf("\t[npm] %s [exact=%v] ->\n\t\t%s", res.Name, res.IsExactMatch, res.Description)
109112
fmt.Println(content)
110113
}
114+
fmt.Println()
111115

116+
fmt.Printf("%d PyPI results found. First %d are:\n", len(ptf.results.pypi), maxResultsToPrint)
112117
for i, res := range ptf.results.pypi {
113118
if i >= maxResultsToPrint {
114119
break
115120
}
116-
content := fmt.Sprintf("[pypi] %s ->\n\t%s", res.Name, res.Description)
121+
content := fmt.Sprintf("\t[pypi] %s ->\n\t\t%s", res.Name, res.Description)
117122
fmt.Println(content)
118123
}
119124
}

0 commit comments

Comments
 (0)