router

package
v0.0.0-...-a7becc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const AppCssUrl = "/static/css/app.css"
View Source
const AppJsUrl = "/static/js/app.js"

Variables

This section is empty.

Functions

func Date

func Date(t time.Time, format string) string

Date Date

func HTTPErrorHandler

func HTTPErrorHandler(err error, ctx echo.Context)

HTTPErrorHandler 全局错误捕捉

func Init

func Init() *echo.Echo

Init 入口

func Md5

func Md5(str string) string

Md5 Md5

func RegDocs

func RegDocs(engine *echo.Echo)

RegDocs 注册文档 dev[开发] 模式需要文档

func Str2html

func Str2html(raw string) template.HTML

Str2html Convert string to template.HTML type.

func Str2js

func Str2js(raw string) template.JS

Str2js Convert string to template.JS type.

func Unix

func Unix(ms int64, fmt string) string

Types

type TplRender

type TplRender struct {
	// contains filtered or unexported fields
}

TplRender is a custom html/template renderer for Echo framework

func (*TplRender) Render

func (tmpl *TplRender) Render(w io.Writer, name string, data interface{}, ctx echo.Context) error

Render renders a template document

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL