diff --git a/t/go/complextest.go b/t/go/complextest.go new file mode 100644 index 00000000..ab9c74c4 --- /dev/null +++ b/t/go/complextest.go @@ -0,0 +1,57 @@ +package main + +import "uwsgi" +import "fmt" +import "net/http" +import "time" + +type App struct { + uwsgi.App +} + +func (app *App) Banner() { + fmt.Println("I am GO !!!") +} + +func (app *App) PostFork() { + if app.WorkerId() == 0 { + fmt.Println("PoSt FoRk on mule", app.MuleId(), "!!!") + } else { + fmt.Println("PoSt FoRk on worker", app.WorkerId(), "!!!") + } +} + +func (app *App) RequestHandler(w http.ResponseWriter, r *http.Request) { + app.Signal(17) + fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) + fmt.Fprintf(w, "