diff options
author | Karan Misra <kidoman@gmail.com> | 2014-01-27 10:54:05 +0530 |
---|---|---|
committer | Karan Misra <kidoman@gmail.com> | 2014-01-27 10:54:05 +0530 |
commit | da9d8e922d0198a324af1f1b6df97d3e1d5938aa (patch) | |
tree | 37c8a313dd61e608f453a73073e434774d47fe73 /http.go | |
parent | fix signature (diff) | |
download | sleepy-da9d8e922d0198a324af1f1b6df97d3e1d5938aa.tar.gz sleepy-da9d8e922d0198a324af1f1b6df97d3e1d5938aa.tar.bz2 sleepy-da9d8e922d0198a324af1f1b6df97d3e1d5938aa.zip |
remove the need to provide “missing/unsupported” implementations in the
API consumers. also:
- more idiomatic
- loosely coupled with the API contract
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/http.go b/http.go deleted file mode 100644 index 7b79aca..0000000 --- a/http.go +++ /dev/null @@ -1,28 +0,0 @@ -package sleepy - -import ( - "net/url" -) - -type ( - GetNotSupported struct{} - PostNotSupported struct{} - PutNotSupported struct{} - DeleteNotSupported struct{} -) - -func (GetNotSupported) Get(values url.Values) (int, interface{}) { - return 405, "" -} - -func (PostNotSupported) Post(values url.Values) (int, interface{}) { - return 405, "" -} - -func (PutNotSupported) Put(values url.Values) (int, interface{}) { - return 405, "" -} - -func (DeleteNotSupported) Delete(values url.Values) (int, interface{}) { - return 405, "" -} |