func UIHandler(uiBundle SwaggerUIBundleConfig, pathPrefix string, log func(v ...interface{})) (http.Handler, error) {
	indexHTML, err := execIndexHTML(uiBundle, pathPrefix)
	if err != nil {
		return nil, err
	}

	assetsHandler := http.FileServer(http.FS(assets))
	var handler http.HandlerFunc = func(writer http.ResponseWriter, request *http.Request) {
		if request.URL.Path == "" || request.URL.Path == "/" {
			_, err = writer.Write(indexHTML)
			if err != nil {
				log(err)
			}
		} else {
			assetsHandler.ServeHTTP(writer, request)
		}
	}

	return http.StripPrefix(pathPrefix, handler), nil
}
// UIHandler serves Swagger UI (index.html and all required js, css assets)
//
// uiBundle argument is a configuration that will be rendered inside index.html as input to the SwaggerUIBundle.
//
// pathPrefix argument allows for setting path under which Swagger UI will be accessible.
// Eg If we want to have Swagger UI under http://example.com/swagger-ui, we would set pathPrefix to "/swagger-ui"
// (leading slash, no trailing slash).
// If no nesting is needed, set pathPrefix to "/".
//
// log argument is being used for logging error when http.ResponseWriter could not write a response
UIHandler serves Swagger UI (index.html and all required js, css assets)

uiBundle argument is a configuration that will be rendered inside index.html as input to the SwaggerUIBundle.

pathPrefix argument allows for setting path under which Swagger UI will be accessible.

log argument is being used for logging error when http.ResponseWriter could not write a response
// UIHandler serves Swagger UI ( index . html and all required js css assets ) // // uiBundle argument is a configuration that will be rendered inside index . html as input to the SwaggerUIBundle . // // pathPrefix argument allows for setting path under which Swagger UI will be accessible . // Eg If we want to have Swagger UI under http : // example . com / swagger - ui we would set pathPrefix to " / swagger - ui " // ( leading slash no trailing slash ) . // If no nesting is needed set pathPrefix to " / " . // // log argument is being used for logging error when http . ResponseWriter could not write a response
func UIHandler(uiBundle SwaggerUIBundleConfig, pathPrefix string, log func(v ...interface{})) (http.Handler, error) {
	indexHTML, err := execIndexHTML(uiBundle, pathPrefix)
	if err != nil {
		return nil, err
	}
	assetsHandler := http.FileServer(http.FS(assets))
	var handler http.HandlerFunc = func(writer http.ResponseWriter, request *http.Request) {
		if request.URL.Path == "" || request.URL.Path == "/" {
			_, err = writer.Write(indexHTML)
			if err != nil {
				log(err)
			}
		} else {
			assetsHandler.ServeHTTP(writer, request)
		}
	}
	return http.StripPrefix(pathPrefix, handler), nil
}
func UIHandler ( uiBundle SwaggerUIBundleConfig , pathPrefix string , log func ( v ... interface { } ) ) ( http . Handler , error ) { indexHTML , err := execIndexHTML ( uiBundle , pathPrefix ) if err != nil { return nil , err } assetsHandler := http . FileServer ( http . FS ( assets ) ) var handler http . HandlerFunc = func ( writer http . ResponseWriter , request * http . Request ) { if request . URL . Path == " " || request . URL . Path == " " { _ , err = writer . Write ( indexHTML ) if err != nil { log ( err ) } } else { assetsHandler . ServeHTTP ( writer , request ) } } return http . StripPrefix ( pathPrefix , handler ) , nil }
UIHandler serves Swagger UI (index.html and all required js, css assets)
UIHandler serves Swagger UI ( index . html and all required js css assets )