Closed mvdan closed 9 years ago
You're right. I'll open a PR to remove the logging and try to return errors if possible! I'll ping this issue when a PR is open.
@mvdan Opinions on changing the API vs removing log lines? There are a few places where there should be an error returned instead of a log
line, think it's worth making breaking changes to properly return an error?
I wrote this many moons ago, but I don't want to break anyone's code based on this library.
I didn't do a PR removing them because they can't be just removed in Reconnect()
. Unless you want Reconnect()
to be silent and not report what's going on.
The method should probably be redone, e.g. a Reconnect() error
that then the importing Go package has to run in a loop and track directly.
You never did a stable release and people can use vendoring, so I wouldn't worry too much about breaking the API.
To build on that - you just broke the API, so why not fix more things while you're at it :)
Good point, I also don't think many people are using it :wink:
Well, I was looking around for an irc library, and started using goirc. After a while got tired of it sucking. So looked at sorcix/irc, but since it was lacking, ended up here :)
Probably more people will do the same.
To build on the lacking thing - I was lazy to implement the whole bot, callback and other stuff myself, especially since you already did.
Closing this as #15 is in!
If this is a library, it should not log anything. Info messages should not be there, and error messages should be returned as errors instead of logged.