Files
docker-cli/cli-plugins/manager/candidate.go
Sebastiaan van Stijn 54367b3283 cli-plugins/manager: un-export "Candidate" interface
It is for internal use for mocking purposes, and is not part
of any public interface / signature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-04 09:14:13 +02:00

20 lines
398 B
Go

package manager
import (
"os/exec"
"github.com/docker/cli/cli-plugins/metadata"
)
type candidate struct {
path string
}
func (c *candidate) Path() string {
return c.path
}
func (c *candidate) Metadata() ([]byte, error) {
return exec.Command(c.path, metadata.MetadataSubcommandName).Output() // #nosec G204 -- ignore "Subprocess launched with a potential tainted input or cmd arguments"
}