Beispiel #1
0
func FileRelative(ctx *wk.HttpContext) (result wk.HttpResult, err error) {
	return wk.File("~/public/humans.txt"), nil
}
Beispiel #2
0
func FileAbsolute(ctx *wk.HttpContext) (result wk.HttpResult, err error) {
	return wk.File(path.Join(ctx.Server.Config.RootDir, "public/humans.txt")), nil
}