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