diff options
author | Doug Black <dblack@twilio.com> | 2014-01-27 10:41:28 -0500 |
---|---|---|
committer | Doug Black <dblack@twilio.com> | 2014-01-27 10:41:28 -0500 |
commit | 0a2d08f88e0a25d8fe388647abdfad029ca6a0b7 (patch) | |
tree | 31ed7a9147b4ac5b4354b00edcaa1f0db4c386b4 /tests/items.go | |
parent | add license (diff) | |
download | sleepy-0a2d08f88e0a25d8fe388647abdfad029ca6a0b7.tar.gz sleepy-0a2d08f88e0a25d8fe388647abdfad029ca6a0b7.tar.bz2 sleepy-0a2d08f88e0a25d8fe388647abdfad029ca6a0b7.zip |
use ServeMux, capitalize API, clean tests
Diffstat (limited to 'tests/items.go')
-rw-r--r-- | tests/items.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/items.go b/tests/items.go deleted file mode 100644 index 978b052..0000000 --- a/tests/items.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "net/url" - "sleepy" -) - -type Item struct { - sleepy.BaseResource -} - -func (item Item) Get(values url.Values) (int, interface{}) { - items := []string{"item1", "item2"} - data := map[string][]string{"items": items} - - return 200, data -} - -func main() { - - item := new(Item) - - var api = new(sleepy.Api) - api.AddResource(item, "/items") - api.Start(3000) - -} |