This is just a go file containing the dist folder of the swagger-api/swagger-ui.
package main
import "github.com/jmattheis/go-packr-swagger-ui"
func main() {
box := swaggerui.GetBox()
}
Usage with gin-gonic/gin
package main
import (
"github.com/jmattheis/go-packr-swagger-ui"
"net/http"
)
func main() {
box := swaggerui.GetBox()
router := gin.New()
g.GET("/docs/*any", gin.WrapH(http.StripPrefix("/docs/", http.FileServer(box))))
g.GET("/swagger", yourSwaggerDefinition)
router.Run()
}