diff --git a/assets.go b/assets.go index bc48da1a5..0fb520134 100644 --- a/assets.go +++ b/assets.go @@ -1,14 +1,11 @@ package main import ( - "bytes" "errors" "html/template" "net/http" "strings" - "github.com/gin-gonic/gin" - assetfs "github.com/elazarl/go-bindata-assetfs" log "github.com/sirupsen/logrus" ) @@ -75,23 +72,3 @@ func loadTemplate(t *template.Template, path string) *template.Template { return t } - -func responseFromStaticFile(c *gin.Context, filepath string, contentType string) { - if !staticFileSystem.Exists("/", filepath) { - c.String(404, "Not found") - return - } - - file, err := staticFileSystem.Open(filepath) - if err != nil { - c.AbortWithError(500, err) - return - } - buf := bytes.NewBuffer(nil) - _, err = buf.ReadFrom(file) - if err != nil { - c.AbortWithError(500, err) - return - } - c.Data(200, contentType, buf.Bytes()) -}