Categorygithub.com/qian-xc/knife4gin
modulepackage
0.1.0
Repository: https://github.com/qian-xc/knife4gin.git
Documentation: pkg.go.dev

# README

knife4gin

介绍

golang的web框架接口文档工具,需要配合gin-swagger使用, 由knife4j移植过来的

配置

package router

import (
	"github.com/gin-gonic/gin"
	"github.com/qian-xc/knife4gin"
)

func InitRouter() *gin.Engine {

	r := gin.New()

	docsDefaultOption := knife4gin.DefaultOption
	//获取swagger生成的json内容
	//docsDefaultOption.DocJson = docs.SwaggerJson()  
	knife4gin.Register(r, &docsDefaultOption)

	return r

}

访问

浏览器打开 /doc/doc.html

# Functions

No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author