23 lines
360 B
Go
23 lines
360 B
Go
|
package controllers
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
type SwaggerController interface {
|
||
|
Get(*gin.Context)
|
||
|
}
|
||
|
|
||
|
type swaggerController struct {
|
||
|
}
|
||
|
|
||
|
func NewSwaggerController() SwaggerController {
|
||
|
return &swaggerController{}
|
||
|
}
|
||
|
|
||
|
func (controller *swaggerController) Get(c *gin.Context) {
|
||
|
c.Redirect(http.StatusFound, "/swagger/index.html")
|
||
|
}
|