blob: 2c64348b94e366f1d850b4ae4c130450ccc1213f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package sleepy
import (
"net/url"
)
type (
GetNotSupported struct{}
PostNotSupported struct{}
PutNotSupported struct{}
DeleteNotSupported struct{}
)
func (GetNotSupported) Get(values ...url.Values) (int, interface{}) {
return 405, map[string]string{"error": "Not implemented"}
}
func (PostNotSupported) Post(values ...url.Values) (int, interface{}) {
return 405, map[string]string{"error": "Not implemented"}
}
func (PutNotSupported) Put(values ...url.Values) (int, interface{}) {
return 405, map[string]string{"error": "Not implemented"}
}
func (DeleteNotSupported) Delete(values ...url.Values) (int, interface{}) {
return 405, map[string]string{"error": "Not implemented"}
}
|