You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"github.com/kataras/iris/v12""github.com/kataras/iris/v12/mvc"
)
funcmain() {
app:=iris.New()
usersRouter:=app.Party("/users")
mvc.New(usersRouter).Handle(new(myController))
// Same as:// usersRouter.Get("/{p:path}", func(ctx iris.Context) {// wildcardPathParameter := ctx.Params().Get("p")// ctx.JSON(response{// Message: "The path parameter is: " + wildcardPathParameter,// })// })/* curl --location --request GET 'http://localhost:8080/users/path_segment_1/path_segment_2' Expected Output: { "message": "The wildcard is: path_segment_1/path_segment_2" } */// Where is dispute pointgofunc() {
for {
}
}()
app.Listen(":8080")
}
typemyControllerstruct{}
typeresponsestruct {
Messagestring`json:"message"`
}
func (c*myController) GetByWildcard(wildcardPathParameterstring) response {
returnresponse{
Message: "The path parameter is: "+wildcardPathParameter,
}
}
I write a simple project according to Wildcard in the MVC example.
If I added the code, my HTTP will be successful several times afterwards, and all the requests will not be available later, as if blocked by something. I am not sure if it is an iris problem, but I have not encountered other frameworks such as gin.
We often encounter this goroutine scene.
gofunc() {
for {
}
}()
The text was updated successfully, but these errors were encountered:
I use the code to join Goroutine to start the service
Now listening on:
> Network: http://192.168.111.227:8080
> Local: http://localhost:8080
Application started. Press CTRL+C to shut down.
Then run the JMater to send 1,000 requests, but stop when a non -fixed number. It did not meet the expectations, and all the requests could not be completed, only a part of the request was completed, and then the request was blocked
Sorry, not the framework is bug, I don't have enough understanding of Gorountine.
If gorountine does not write a function, Runtime has no chance to intervene, so it is impossible.
I write a simple project according to Wildcard in the MVC example.
If I added the code, my HTTP will be successful several times afterwards, and all the requests will not be available later, as if blocked by something. I am not sure if it is an
iris
problem, but I have not encountered other frameworks such asgin
.We often encounter this goroutine scene.
The text was updated successfully, but these errors were encountered: