Hacker News new | past | comments | ask | show | jobs | submit login

The http package can't send delete, head, or put requests. Couchdb uses all of these methods, not just post and get.

I filed an issue a few weeks ago for this: http://code.google.com/p/go/issues/detail?id=155




Didn't consider that. (But wouldn't it make more sense to copy the code instead of requiring user change to the package?)


Yeah, I agree it isn't the most elegant way to do it, but the alternative is to keep a copy of go's http package in the gocouch repo, which isn't too elegant either.

My guess is that within a couple months Go will have a new http client that's fully-featured (keep-alive requests, authentication, and support for generic requests). Until then, if people have a burning need to use gocouch, they'll have to add that small method to the http package. Plus, people are used to compiling the go source code because it's the only way to install it (no binary packages yet)


Its not really an issue of elegance. Either way is not pleasing, but given that your code is the only consumer of the exposed http.Send, my recommendation is that you isolate your end users from the Go.http's evolution by including the (dup) code in your source and removing it when the update release fixes the issue. Transition would be transparent to your end users.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: