1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

fix some errCheck warnings, and update examples

- Explicitly suppress some unhandled errors
- Use "pass" credentials helper in examples, which is available
  on more platforms than "secretservice" (only supporte on Linux)
- Update domain and username in examples.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-05-28 12:33:58 +02:00
parent 94483d2d23
commit 19557f8fff
2 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -59,7 +59,7 @@ func Serve(helper Helper) {
}
if err != nil {
fmt.Fprintf(os.Stdout, "%v\n", err)
_, _ = fmt.Fprintln(os.Stdout, err)
os.Exit(1)
}
}
@@ -143,7 +143,7 @@ func Get(helper Helper, reader io.Reader, writer io.Writer) error {
return err
}
fmt.Fprint(writer, buffer.String())
_, _ = fmt.Fprint(writer, buffer.String())
return nil
}
@@ -181,6 +181,6 @@ func List(helper Helper, writer io.Writer) error {
// PrintVersion outputs the current version.
func PrintVersion(writer io.Writer) error {
fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version)
_, _ = fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version)
return nil
}