INNER CODE UNIT · Go
plaintextHandler
networknt/microservices-framework-benchmark · go-fasthttp/server.go:46
func plaintextHandler(ctx *fasthttp.RequestCtx) {
ctx.SetContentType("text/plain")
ctx.WriteString("Hello World!")
}
func getListener() net.Listener {
if !*prefork {
runtime.GOMAXPROCS(runtime.NumCPU())
ln, err := net.Listen("tcp4", *listenAddr)
if err != nil {
log.Fatal(err)
}
return ln
}
if !*child {
children := make([]*exec.Cmd, runtime.NumCPU())
for i := range children {