Commit Briefs
Revert "Create a new client interface"
This reverts commit bd3b8a33c54037e66233db80fd1120eb0b6215f1. It's a bad idea. I'm writing a fake server instead so that we can use the real client code.
Create a new client interface
So that testing the client doesn't involve making real HTTP requests.
Correctly return ErrNoMatch
The check was incorrect before. The HTTP status on responses is still 200 OK, but with empty results if there are no matches to the filter.
Always format generated code
While here document what is needed to actually run go generate.
Set accurate crud.go header comment
getopt(1) clears the value of "$@", so grab it before it's cleared
deduplicate new test client code
This adds a newTestClient option so that we aren't constantly creating new http transports clients and all that
Support Icinga2 hostgroups
Tests of hostgroup operations are done in TestFilter
Generate CRUD code using go generate
Explanation for use is in the README
