providesCommand returns true if any of the package's files entries has a binary matching the given command name.
(pkg *Package, command string)
| 256 | // providesCommand returns true if any of the package's files entries has |
| 257 | // a binary matching the given command name. |
| 258 | func providesCommand(pkg *Package, command string) bool { |
| 259 | for _, f := range pkg.Files { |
| 260 | if f.Name == command { |
| 261 | return true |
| 262 | } |
| 263 | } |
| 264 | return false |
| 265 | } |
| 266 | |
| 267 | // fetchIndex fetches and parses the full registry index. |
| 268 | // The raw YAML is cached to disk; on fetch failure the cached copy is used. |
no outgoing calls