aboutsummaryrefslogtreecommitdiff
path: root/README.md
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 /README.md
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 'README.md')
-rw-r--r--README.md6
1 files changed, 1 insertions, 5 deletions
diff --git a/README.md b/README.md
index 5447f30..97c01ce 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,11 @@ package main
import (
"net/url"
+
"github.com/dougblack/sleepy"
)
type Item struct {
- sleepy.PostNotSupported
- sleepy.PutNotSupported
- sleepy.DeleteNotSupported
}
func (item Item) Get(values url.Values) (int, interface{}) {
@@ -26,13 +24,11 @@ func (item Item) Get(values url.Values) (int, interface{}) {
}
func main() {
-
item := new(Item)
var api = new(sleepy.Api)
api.AddResource(item, "/items")
api.Start(3000)
-
}
```
bgstack15