zemirco / couchdb

CouchDB client in Go
MIT License
44 stars 14 forks source link

Purge support #4

Closed enst closed 8 years ago

enst commented 8 years ago

I'm relativity new to Go. Just a pull request for you to review. It works for me though. Thanks,

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-2.4%) to 73.243% when pulling ff7a775014033a344c702a5ef231f4da35fd9265 on enst:master into b19f8fe154152ec8b4f742d028aee6ee2f6df8a8 on zemirco:master.

zemirco commented 8 years ago

Please add some tests for your code.

bingli1000 commented 8 years ago

map[string][]string works too. But I haven't figured out how to make the test case work. It seems DocumentResponse does't meet the needs in this case. Not sure if a new type of response struct is needed.

zemirco commented 8 years ago

You're right. We'd have to add another response struct that looks like the CouchDB response.

{
    "purge_seq":3,
    "purged":{
        "c6114c65e295552ab1019e2b046b10e": [
            "3-b06fcd1c1c9e0ec7c480ee8aa467bf3b"
        ]
    }
}