httpgo

package
v0.0.0-...-128a1fa Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpEngine

func NewHttpEngine(container framework.Container) (*gin.Engine, error)

NewHttpEngine 创建了一个绑定了路由的 Web 引擎

func NewHttpEngine() (*gin.Engine, error) {
	// 设置为 Release,为的是默认在启动中不输出调试信息
	gin.SetMode(gin.ReleaseMode)
	// 默认启动一个 Web 引擎
	r := gin.Default()
	// 业务绑定路由操作
	Routes(r)
	// 返回绑定路由后的 Web 引擎
	return r, nil
}

func Routes

func Routes(r *gin.Engine)

Types

This section is empty.

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

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