package main

import (
	"github.com/xyproto/web.go"
)

type Greeter struct {
	greeting string
}

func (g *Greeter) Greet(s string) string {
	return g.greeting + " " + s
}

func main() {
	g := &Greeter{"hello"}
	web.Get("/(.*)", func(ctx *web.Context, path string) string { return g.Greet(path) })
	web.Run("0.0.0.0:9999")
}

package main

import (
	"github.com/xyproto/web.go"
)

type Greeter struct {
	greeting string
}

func (g *Greeter) Greet(s string) string {
	return g.greeting + " " + s
}

func main() {
	g := &Greeter{"hello"}
	web.Get("/(.*)", web.MethodHandler(g, "Greet"))
	web.Run("0.0.0.0:9999")
}

Revert "fixed method handler example"
Revert "fixed method handler example"

This reverts commit 3d470f58ea86647a80763e02608a3f2a9b2a06b6.
