go 1.16 features

- use go embed instead of go-binary and remove all about old assets (go 1.16 feature)
- pin gox version (go 1.16 feature)
- update ci to go 1.16
This commit is contained in:
Nikita Kazarian
2021-03-05 03:38:08 +03:00
parent 68e6f2d117
commit 8e2c826ba3
12 changed files with 34 additions and 771 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/gin-gonic/gin"
"github.com/sosedoff/pgweb/pkg/data"
"github.com/sosedoff/pgweb/pkg/shared"
)
@@ -145,16 +144,6 @@ func assetContentType(name string) string {
return result
}
func serveStaticAsset(path string, c *gin.Context) {
data, err := data.Asset("static" + path)
if err != nil {
c.String(400, err.Error())
return
}
c.Data(200, assetContentType(path), data)
}
// Send a query result to client
func serveResult(c *gin.Context, result interface{}, err interface{}) {
if err == nil {