From da9d8e922d0198a324af1f1b6df97d3e1d5938aa Mon Sep 17 00:00:00 2001 From: Karan Misra Date: Mon, 27 Jan 2014 10:54:05 +0530 Subject: remove the need to provide “missing/unsupported” implementations in the API consumers. also: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - more idiomatic - loosely coupled with the API contract --- http.go | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 http.go (limited to 'http.go') 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, "" -} -- cgit