aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorKaran Misra <kidoman@gmail.com>2014-01-27 10:54:05 +0530
committerKaran Misra <kidoman@gmail.com>2014-01-27 10:54:05 +0530
commitda9d8e922d0198a324af1f1b6df97d3e1d5938aa (patch)
tree37c8a313dd61e608f453a73073e434774d47fe73 /http.go
parentfix signature (diff)
downloadsleepy-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.go28
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, ""
-}
bgstack15