mirror of
https://github.com/kataras/iris.git
synced 2026-01-04 02:37:14 +00:00
formatting
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
@@ -71,7 +71,6 @@ func newApp() *iris.Application {
|
||||
// Pssst, don't forget dynamic-path example for more "magic"!
|
||||
app.Get("/api/users/{userid:uint64 min(1)}", func(ctx iris.Context) {
|
||||
userID, err := ctx.Params().GetUint64("userid")
|
||||
|
||||
if err != nil {
|
||||
ctx.Writef("error while trying to parse userid parameter," +
|
||||
"this will never happen if :uint64 is being used because if it's not a valid uint64 it will fire Not Found automatically.")
|
||||
|
||||
@@ -85,5 +85,4 @@ func TestRoutingBasic(t *testing.T) {
|
||||
|
||||
e.Request("GET", "/").WithURL("http://any-subdomain-here.example.com").Expect().Status(httptest.StatusOK).
|
||||
Body().Equal(expectedSubdomainWildcardIndexResponse)
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
// You can use the .WrapRouter to add custom logic when or when not the router should
|
||||
// be executed in order to execute the registered routes' handlers.
|
||||
func newApp() *iris.Application {
|
||||
|
||||
app := iris.New()
|
||||
|
||||
app.OnErrorCode(iris.StatusNotFound, func(ctx iris.Context) {
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestRouting(t *testing.T) {
|
||||
app := newApp()
|
||||
e := httptest.New(t, app)
|
||||
|
||||
var tests = []troute{
|
||||
tests := []troute{
|
||||
// GET
|
||||
newTroute("GET", "", "/healthcheck", httptest.StatusOK),
|
||||
newTroute("GET", "", "/games/{gameID}/clans", httptest.StatusOK, "gameID", "42"),
|
||||
|
||||
@@ -36,5 +36,4 @@ func main() {
|
||||
// See view/template_html_4 example for more reverse routing examples
|
||||
// using the reverse router component and the {{url}} and {{urlpath}} template functions.
|
||||
app.Run(iris.Addr(":8080"))
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ func main() {
|
||||
})
|
||||
|
||||
app.Get("/change", func(ctx iris.Context) {
|
||||
|
||||
if none.IsOnline() {
|
||||
none.Method = iris.MethodNone
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user