| 644 | } |
| 645 | |
| 646 | func logConventions(io *iostreams.IOStreams, skills []discovery.Skill) { |
| 647 | conventions := make(map[string]int) |
| 648 | for _, s := range skills { |
| 649 | conventions[s.Convention]++ |
| 650 | } |
| 651 | if n, ok := conventions["skills-namespaced"]; ok { |
| 652 | fmt.Fprintf(io.ErrOut, "Note: found %d namespaced skill(s) in skills/{author}/ directories\n", n) |
| 653 | } |
| 654 | if n, ok := conventions["plugins"]; ok { |
| 655 | fmt.Fprintf(io.ErrOut, "Note: found %d skill(s) using the plugins/ convention\n", n) |
| 656 | } |
| 657 | if n, ok := conventions["root"]; ok { |
| 658 | fmt.Fprintf(io.ErrOut, "Note: found %d skill(s) at the repository root\n", n) |
| 659 | } |
| 660 | } |
| 661 | |
| 662 | // skillSelector holds the callbacks that differ between remote and local skill selection. |
| 663 | type skillSelector struct { |