package main import ( _ "91porn-server/docs" "github.com/gin-gonic/gin" ) var SwagHandler gin.HandlerFunc // @title 91porn-server 项目API文档 // @version 1.0 // @description 项目接口文档 // @termsOfService 91porn-server // @contact.name 91porn // @contact.url 91porn@gamil.com // @contact.email 91porn@gamil.com // @license.name Apache 2.0 // @license.url http://www.apache.org/licenses/LICENSE-2.0.html // @Param Authorization header string true "token" default(A) // @host 192.168.2.195:8182 // @BasePath /api // @securityDefinitions.apikey ApiKeyAuth // @in header // @name Authorization func main() { gin.SetMode(gin.ReleaseMode) r := gin.Default() if SwagHandler != nil { r.GET("/swagger/*any", SwagHandler) } println("swag server start list port:[20114]\nAPI URL: https://91pornht.cestalt.com/swagger/index.html") _ = r.Run(":20114") }