This commit is contained in:
21
vendor/github.com/docker/cli/cli-plugins/manager/candidate.go
generated
vendored
Normal file
21
vendor/github.com/docker/cli/cli-plugins/manager/candidate.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
package manager
|
||||
|
||||
import "os/exec"
|
||||
|
||||
// Candidate represents a possible plugin candidate, for mocking purposes
|
||||
type Candidate interface {
|
||||
Path() string
|
||||
Metadata() ([]byte, error)
|
||||
}
|
||||
|
||||
type candidate struct {
|
||||
path string
|
||||
}
|
||||
|
||||
func (c *candidate) Path() string {
|
||||
return c.path
|
||||
}
|
||||
|
||||
func (c *candidate) Metadata() ([]byte, error) {
|
||||
return exec.Command(c.path, MetadataSubcommandName).Output()
|
||||
}
|
Reference in New Issue
Block a user