继了解get,post后
 package main
import "github.com/kataras/iris/v12"
func main(){
	app := iris.New()
	
	app.Handle("GET","/userinfo",func(ctx iris.Context){
		path := ctx.Path()
		app.Logger().Info(path) 
	})
	app.Listen(":8083")
}
 localhost:8083/userinfo
 
 日志打印
 app := iris.New()
app.Handle("GET","/userinfo",func(ctx iris.Context){
		path := ctx.Path()
		app.Logger().Info(path) 
		app.Logger().Error()	
	})
 Get正则表达式路由
 package main
import "github.com/kataras/iris/v12"
func main(){
	app := iris.New()
	app.Get("/hello/{name}",func(ctx iris.Context){
		path := ctx.Path()
		app.Logger().Info(path)
		
		name := ctx.Params().Get("name")
		ctx.HTML("<h1>"+name+"</h1>") 
	})
	app.Listen(":8083")
}
 localhost:8083/hello/10
 
 自定义正则表达式
 package main
import "github.com/kataras/iris/v12"
func main(){
	app := iris.New()
	app.Get("/hello/{isLogin:bool}",func(ctx iris.Context){
		isLogin,err := ctx.Params().GetBool("isLogin")
		if err != nil{
			ctx.StatusCode(iris.StatusNonAuthoritativeInfo)
			return
		}
		if isLogin {
			
		}
	})
	app.Listen(":8083")
}