|
|
@ -21,6 +21,7 @@ var searchCmd = &cobra.Command{
|
|
|
|
Short: "Search for a keyword in charts",
|
|
|
|
Short: "Search for a keyword in charts",
|
|
|
|
Long: "Searches the known repositories cache files for the specified search string, looks at name and keywords",
|
|
|
|
Long: "Searches the known repositories cache files for the specified search string, looks at name and keywords",
|
|
|
|
RunE: search,
|
|
|
|
RunE: search,
|
|
|
|
|
|
|
|
PreRunE: requireInit,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func search(cmd *cobra.Command, args []string) error {
|
|
|
|
func search(cmd *cobra.Command, args []string) error {
|
|
|
@ -47,6 +48,9 @@ func searchChartRefsForPattern(search string, chartRefs map[string]*repo.ChartRe
|
|
|
|
matches = append(matches, k)
|
|
|
|
matches = append(matches, k)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if c.Chartfile == nil {
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
for _, keyword := range c.Chartfile.Keywords {
|
|
|
|
for _, keyword := range c.Chartfile.Keywords {
|
|
|
|
if strings.Contains(keyword, search) {
|
|
|
|
if strings.Contains(keyword, search) {
|
|
|
|
matches = append(matches, k)
|
|
|
|
matches = append(matches, k)
|
|
|
|