Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General fixups #8

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

stuartskelton
Copy link

I love this module and its helped me out a lot, or saved me some pain porting over a Perl version.

I have ran through the code updated some bits an pieces, its certainly not a comprehensive look.

Feel free to use or not use anything here.

Regards

@stuartskelton
Copy link
Author

This is failing because of:

./clamd.go:128: Sprintf format %s has arg s of wrong type *clamd.ScanResult
./clamd.go:189: Sprintf format %s has arg s of wrong type *clamd.ScanResult

I would like to do this...

--- a/clamd.go
+++ b/clamd.go
@@ -26,7 +26,6 @@ SOFTWARE.
 package clamd

 import (
-       "errors"
        "fmt"
        "io"
        "net/url"
@@ -125,7 +124,7 @@ func (c *Clamd) Ping() error {
                case "PONG":
                        return nil
                default:
-                       return errors.New(fmt.Sprintf("Invalid response, got %s.", s))
+                       return fmt.Errorf("Invalid response, got %v.", s)
                }
        }
 }
@@ -186,7 +185,7 @@ func (c *Clamd) Reload() error {
                case "RELOADING":
                        return nil
                default:
-                       return errors.New(fmt.Sprintf("Invalid response, got %s.", s))
+                       return fmt.Errorf("Invalid response, got %v.", s)
                }
        }
 }

but I am not sure about the GO 1.1, 1.2 and 1.3 in the travis file, are you happy for me to remove them and bump the test versions to be 1.9 and 1.10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant