aboutsummaryrefslogtreecommitdiff
path: root/tests/items.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/items.go')
-rw-r--r--tests/items.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/items.go b/tests/items.go
index a6f53f6..ee86c3e 100644
--- a/tests/items.go
+++ b/tests/items.go
@@ -1,29 +1,29 @@
package main
import (
- "net/url"
- "sleepy"
+ "net/url"
+ "sleepy"
)
type Item struct {
- sleepy.PostNotSupported
- sleepy.PutNotSupported
- sleepy.DeleteNotSupported
+ sleepy.PostNotSupported
+ sleepy.PutNotSupported
+ sleepy.DeleteNotSupported
}
func (item Item) Get(values ...url.Values) (int, interface{}) {
- items := []string{"item1", "item2"}
- data := map[string][]string{"items": items}
+ items := []string{"item1", "item2"}
+ data := map[string][]string{"items": items}
- return 200, data
+ return 200, data
}
func main() {
- item := new(Item)
+ item := new(Item)
- var api = new(sleepy.Api)
- api.AddResource(item, "/items")
- api.Start(3000)
+ var api = new(sleepy.Api)
+ api.AddResource(item, "/items")
+ api.Start(3000)
}
bgstack15