19 lines
250 B
Go
19 lines
250 B
Go
|
package controller
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func Close(c *gin.Context) {
|
||
|
|
||
|
// Close connection
|
||
|
err := client.Teardown(c)
|
||
|
if err != nil {
|
||
|
c.Status(http.StatusInternalServerError)
|
||
|
return
|
||
|
}
|
||
|
c.Status(http.StatusOK)
|
||
|
}
|