diff --git a/content/content.go b/send/send.go
similarity index 98%
rename from content/content.go
rename to send/send.go
index 2eca461..79e2cf8 100644
--- a/content/content.go
+++ b/send/send.go
@@ -1,4 +1,4 @@
-package content
+package send
import (
"encoding/json"
diff --git a/content/content_test.go b/send/send_test.go
similarity index 82%
rename from content/content_test.go
rename to send/send_test.go
index 5d4d2ca..4822a4e 100644
--- a/content/content_test.go
+++ b/send/send_test.go
@@ -1,42 +1,42 @@
-package content_test
+package send_test
import (
"testing"
"git.akyoto.dev/go/assert"
"git.akyoto.dev/go/web"
- "git.akyoto.dev/go/web/content"
+ "git.akyoto.dev/go/web/send"
)
func TestContentTypes(t *testing.T) {
s := web.NewServer()
s.Get("/css", func(ctx web.Context) error {
- return content.CSS(ctx, "body{}")
+ return send.CSS(ctx, "body{}")
})
s.Get("/csv", func(ctx web.Context) error {
- return content.CSV(ctx, "ID;Name\n")
+ return send.CSV(ctx, "ID;Name\n")
})
s.Get("/html", func(ctx web.Context) error {
- return content.HTML(ctx, "")
+ return send.HTML(ctx, "")
})
s.Get("/js", func(ctx web.Context) error {
- return content.JS(ctx, "console.log(42)")
+ return send.JS(ctx, "console.log(42)")
})
s.Get("/json", func(ctx web.Context) error {
- return content.JSON(ctx, struct{ Name string }{Name: "User 1"})
+ return send.JSON(ctx, struct{ Name string }{Name: "User 1"})
})
s.Get("/text", func(ctx web.Context) error {
- return content.Text(ctx, "Hello")
+ return send.Text(ctx, "Hello")
})
s.Get("/xml", func(ctx web.Context) error {
- return content.XML(ctx, "")
+ return send.XML(ctx, "")
})
tests := []struct {