DockerCLI/cli-plugins/manager
Sebastiaan van Stijn 5aba4860de
cli-plugins/manager: TestPluginError: don't use yaml.Marshal
The test used  `gopkg.in/yaml.v2` to verify the TextMarshaller implementation,
which was implemented to allow printing the errors in JSON formatted output;

> This exists primarily to implement encoding.TextMarshaller such that
> rendering a plugin as JSON (e.g. for `docker info -f '{{json .CLIPlugins}}'`)
> renders the Err field as a useful string and not just `{}`.

Given that both yaml.Marshal and json.Marshal use this, we may as well use
Go's stdlib.

While updating, also changed some of the assertions to checks, so that we don't
fail the test early.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-17 13:17:51 +01:00
..
candidate.go Use golang.org/x/sys/execabs 2021-01-26 17:18:04 +00:00
candidate_test.go Always enable experimental features 2020-10-02 15:59:42 +02:00
cobra.go Adopt Cobra completion v2 to support completion by CLI plugins 2022-05-12 12:59:10 +02:00
error.go Update some uses of errors.Cause() to errors.Is() 2020-05-10 19:56:35 +02:00
error_test.go cli-plugins/manager: TestPluginError: don't use yaml.Marshal 2022-11-17 13:17:51 +01:00
manager.go cli-plugins/manager: add IsPluginCommand(() utility 2022-09-30 02:24:23 +02:00
manager_test.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
manager_unix.go gofmt with go1.17 2022-03-26 20:21:00 +01:00
manager_windows.go Search Windows CLI plugins also in ProgramFiles 2019-03-20 11:45:03 -07:00
metadata.go Always enable experimental features 2020-10-02 15:59:42 +02:00
plugin.go format code with gofumpt 2022-09-30 11:59:11 +02:00
suffix_unix.go format code with gofumpt 2022-09-30 11:59:11 +02:00
suffix_windows.go Check for `.exe` case insensitively 2019-01-30 13:45:26 +00:00