We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Really useful but.. do you support unix socket? If not, would you accept a PR?
Thanks a lot! Awesome work
The text was updated successfully, but these errors were encountered:
Thanks!
Do you support unix socket
Maybe? I never tried it. The New() function is func New(addr string, d Dialer), where Dialer is:
New()
func New(addr string, d Dialer)
Dialer
type Dialer interface { DialContext(ctx context.Context, network, address string) (net.Conn, error) }
This may already work if you write a thin wrapper around net.UnixConn or something.
net.UnixConn
It could (and should) definitely be more straightforward than that though!
would you accept a PR?
Sure; the only reason it's not supported is because I don't need/use it.
Sorry, something went wrong.
I think it won't work because of this line -> https://github.com/Teamwork/spamc/blob/master/spamc.go#L163
The only solution I see would be to add a third parameter to the New() function, something like:
func New(addr string, d Dialer, p string) { ... return &Client{ addr: addr, dialer: d, proto: p, } }
and then instead of https://github.com/Teamwork/spamc/blob/master/spamc.go#L163 :
conn, err := c.dialer.DialContext(ctx, c.proto, c.addr)
Would it be ok? (I'll update the tests too)
No branches or pull requests
Really useful but.. do you support unix socket? If not, would you accept a PR?
Thanks a lot! Awesome work
The text was updated successfully, but these errors were encountered: