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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user