add comments and unexport some fields

This commit is contained in:
Henrique Dias
2017-06-25 14:24:26 +01:00
parent b93158b291
commit fffbcc7098
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