mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 03:56:27 +01:00
misspell fix
Former-commit-id: a6e81fd308a1f741c16d24793778d4046a172b35
This commit is contained in:
parent
9a3c4f4c0a
commit
5c318dfce6
|
@ -1016,7 +1016,7 @@ func main() {
|
||||||
ctx.Render("client.html", clientPage{"Client Page", ctx.Host()})
|
ctx.Render("client.html", clientPage{"Client Page", ctx.Host()})
|
||||||
})
|
})
|
||||||
|
|
||||||
// the path which the websocket client should listen/registed to ->
|
// the path which the websocket client should listen/registered to ->
|
||||||
iris.Config.Websocket.Endpoint = "/my_endpoint"
|
iris.Config.Websocket.Endpoint = "/my_endpoint"
|
||||||
// by-default all origins are accepted, you can change this behavior by setting:
|
// by-default all origins are accepted, you can change this behavior by setting:
|
||||||
// iris.Config.Websocket.CheckOrigin
|
// iris.Config.Websocket.CheckOrigin
|
||||||
|
@ -1100,7 +1100,7 @@ func main() {
|
||||||
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// the path which the websocket client should listen/registed to,
|
// the path which the websocket client should listen/registered to,
|
||||||
Endpoint: "/my_endpoint",
|
Endpoint: "/my_endpoint",
|
||||||
// the client-side javascript static file path
|
// the client-side javascript static file path
|
||||||
// which will be served by Iris.
|
// which will be served by Iris.
|
||||||
|
|
|
@ -67,7 +67,7 @@ func TestMuxSimple(t *testing.T) {
|
||||||
app := newApp()
|
app := newApp()
|
||||||
|
|
||||||
testRoutes := []testRoute{
|
testRoutes := []testRoute{
|
||||||
// FOUND - registed
|
// FOUND - registered
|
||||||
{"GET", "/test_get", "/test_get", "", "hello, get!", 200, true, nil, nil},
|
{"GET", "/test_get", "/test_get", "", "hello, get!", 200, true, nil, nil},
|
||||||
{"POST", "/test_post", "/test_post", "", "hello, post!", 200, true, nil, nil},
|
{"POST", "/test_post", "/test_post", "", "hello, post!", 200, true, nil, nil},
|
||||||
{"PUT", "/test_put", "/test_put", "", "hello, put!", 200, true, nil, nil},
|
{"PUT", "/test_put", "/test_put", "", "hello, put!", 200, true, nil, nil},
|
||||||
|
@ -77,7 +77,7 @@ func TestMuxSimple(t *testing.T) {
|
||||||
{"CONNECT", "/test_connect", "/test_connect", "", "hello, connect!", 200, true, nil, nil},
|
{"CONNECT", "/test_connect", "/test_connect", "", "hello, connect!", 200, true, nil, nil},
|
||||||
{"PATCH", "/test_patch", "/test_patch", "", "hello, patch!", 200, true, nil, nil},
|
{"PATCH", "/test_patch", "/test_patch", "", "hello, patch!", 200, true, nil, nil},
|
||||||
{"TRACE", "/test_trace", "/test_trace", "", "hello, trace!", 200, true, nil, nil},
|
{"TRACE", "/test_trace", "/test_trace", "", "hello, trace!", 200, true, nil, nil},
|
||||||
// NOT FOUND - not registed
|
// NOT FOUND - not registered
|
||||||
{"GET", "/test_get_nofound", "/test_get_nofound", "", "Not Found", 404, false, nil, nil},
|
{"GET", "/test_get_nofound", "/test_get_nofound", "", "Not Found", 404, false, nil, nil},
|
||||||
{"POST", "/test_post_nofound", "/test_post_nofound", "", "Not Found", 404, false, nil, nil},
|
{"POST", "/test_post_nofound", "/test_post_nofound", "", "Not Found", 404, false, nil, nil},
|
||||||
{"PUT", "/test_put_nofound", "/test_put_nofound", "", "Not Found", 404, false, nil, nil},
|
{"PUT", "/test_put_nofound", "/test_put_nofound", "", "Not Found", 404, false, nil, nil},
|
||||||
|
@ -233,7 +233,7 @@ func TestMuxCustomErrors(t *testing.T) {
|
||||||
notFoundMessage = "Iris custom message for 404 not found"
|
notFoundMessage = "Iris custom message for 404 not found"
|
||||||
internalServerMessage = "Iris custom message for 500 internal server error"
|
internalServerMessage = "Iris custom message for 500 internal server error"
|
||||||
testRoutesCustomErrors = []testRoute{
|
testRoutesCustomErrors = []testRoute{
|
||||||
// NOT FOUND CUSTOM ERRORS - not registed
|
// NOT FOUND CUSTOM ERRORS - not registered
|
||||||
{"GET", "/test_get_nofound_custom", "/test_get_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"GET", "/test_get_nofound_custom", "/test_get_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
{"POST", "/test_post_nofound_custom", "/test_post_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"POST", "/test_post_nofound_custom", "/test_post_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
{"PUT", "/test_put_nofound_custom", "/test_put_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"PUT", "/test_put_nofound_custom", "/test_put_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
|
@ -243,7 +243,7 @@ func TestMuxCustomErrors(t *testing.T) {
|
||||||
{"CONNECT", "/test_connect_nofound_custom", "/test_connect_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"CONNECT", "/test_connect_nofound_custom", "/test_connect_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
{"PATCH", "/test_patch_nofound_custom", "/test_patch_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"PATCH", "/test_patch_nofound_custom", "/test_patch_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
{"TRACE", "/test_trace_nofound_custom", "/test_trace_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
{"TRACE", "/test_trace_nofound_custom", "/test_trace_nofound_custom", "", notFoundMessage, 404, false, nil, nil},
|
||||||
// SERVER INTERNAL ERROR 500 PANIC CUSTOM ERRORS - registed
|
// SERVER INTERNAL ERROR 500 PANIC CUSTOM ERRORS - registered
|
||||||
{"GET", "/test_get_panic_custom", "/test_get_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
{"GET", "/test_get_panic_custom", "/test_get_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
||||||
{"POST", "/test_post_panic_custom", "/test_post_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
{"POST", "/test_post_panic_custom", "/test_post_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
||||||
{"PUT", "/test_put_panic_custom", "/test_put_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
{"PUT", "/test_put_panic_custom", "/test_put_panic_custom", "", internalServerMessage, 500, true, nil, nil},
|
||||||
|
|
|
@ -21,7 +21,7 @@ func main() {
|
||||||
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// the path which the websocket client should listen/registed to,
|
// the path which the websocket client should listen/registered to,
|
||||||
Endpoint: "/my_endpoint",
|
Endpoint: "/my_endpoint",
|
||||||
// the client-side javascript static file path
|
// the client-side javascript static file path
|
||||||
// which will be served by Iris.
|
// which will be served by Iris.
|
||||||
|
|
|
@ -23,7 +23,7 @@ func main() {
|
||||||
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// the path which the websocket client should listen/registed to,
|
// the path which the websocket client should listen/registered to,
|
||||||
Endpoint: "/my_endpoint",
|
Endpoint: "/my_endpoint",
|
||||||
// the client-side javascript static file path
|
// the client-side javascript static file path
|
||||||
// which will be served by Iris.
|
// which will be served by Iris.
|
||||||
|
|
|
@ -29,7 +29,7 @@ func main() {
|
||||||
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// the path which the websocket client should listen/registed to,
|
// the path which the websocket client should listen/registered to,
|
||||||
Endpoint: "/my_endpoint",
|
Endpoint: "/my_endpoint",
|
||||||
// to enable binary messages (useful for protobuf):
|
// to enable binary messages (useful for protobuf):
|
||||||
// BinaryMessages: true,
|
// BinaryMessages: true,
|
||||||
|
|
|
@ -24,7 +24,7 @@ func main() {
|
||||||
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.Adapt(view.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// the path which the websocket client should listen/registed to,
|
// the path which the websocket client should listen/registered to,
|
||||||
Endpoint: "/my_endpoint",
|
Endpoint: "/my_endpoint",
|
||||||
// the client-side javascript static file path
|
// the client-side javascript static file path
|
||||||
// which will be served by Iris.
|
// which will be served by Iris.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user