cli-plugins: minor cleanups: use Println

- use Println to print newline instead of custom format
- suppress some errors to make my IDE and linters happier
- use res.Assert() with icmd.Expected{} where possible to make
  assertions not depend on newline / whitespace randomness
- use apiClient instead of client for the API client to
  prevent shadowing imports.
- use dockerCLI with Go's standard camelCase casing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-02-01 22:16:12 +01:00
parent 4d7fe01d4b
commit b10b79e6fd
7 changed files with 41 additions and 37 deletions

View File

@ -113,7 +113,7 @@ func RootCmd(dockerCli command.Cli) *cobra.Command {
select {
case <-done:
case <-time.After(2 * time.Second):
_, _ = fmt.Fprint(dockerCli.Err(), "timeout after 2 seconds")
_, _ = fmt.Fprintln(dockerCli.Err(), "timeout after 2 seconds")
}
return nil
},