add comments and unexport some fields

Former-commit-id: fffbcc7098e7eab38351dc7e202983f4749a74eb
This commit is contained in:
Henrique Dias
2017-06-25 14:24:26 +01:00
parent 475a07671d
commit 99d99843b7
8 changed files with 94 additions and 76 deletions

View File

@@ -8,13 +8,13 @@ import (
"strings"
)
// AssetsURL is the url of the assets
const AssetsURL = "/_internal"
// assetsURL is the url where static assets are served.
const assetsURL = "/_internal"
// Serve provides the needed assets for the front-end
func serveAssets(w http.ResponseWriter, r *http.Request, m *FileManager) (int, error) {
// gets the filename to be used with Assets function
filename := strings.Replace(r.URL.Path, m.baseURL+AssetsURL, "", 1)
filename := strings.Replace(r.URL.Path, m.baseURL+assetsURL, "", 1)
var file []byte
var err error