knife4gf is swagger ui for GoFrame V2, it based on knife4j.
- 安装
knife4gf
go get -u github.com/iasuma/knife4gf@{tag}
- 引入
knife4gf
package main
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/iasuma/knife4gf"
)
func main() {
s := g.Server()
s.Plugin(&knife4gf.Knife4gf{})
s.SetPort(8199)
s.Run()
}
Start your server and visit: http://127.0.0.1:8199/kdoc/