Shorten variable names
This commit is contained in:
parent
a9a88552d7
commit
4b219827da
2 changed files with 4 additions and 4 deletions
|
@ -23,10 +23,10 @@ func BucketHandler(s3 *minio.Client) http.Handler {
|
||||||
bucketName := mux.Vars(r)["bucketName"]
|
bucketName := mux.Vars(r)["bucketName"]
|
||||||
var objs []objects.WithIcon
|
var objs []objects.WithIcon
|
||||||
|
|
||||||
lp := path.Join("views", "layout.html")
|
l := path.Join("views", "layout.html")
|
||||||
p := path.Join("views", "bucket.html")
|
p := path.Join("views", "bucket.html")
|
||||||
|
|
||||||
t, err := template.ParseFiles(lp, p)
|
t, err := template.ParseFiles(l, p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := "error parsing templates"
|
msg := "error parsing templates"
|
||||||
web.HandleHTTPError(w, msg, err, http.StatusInternalServerError)
|
web.HandleHTTPError(w, msg, err, http.StatusInternalServerError)
|
||||||
|
|
|
@ -12,10 +12,10 @@ import (
|
||||||
// BucketsHandler shows all buckets
|
// BucketsHandler shows all buckets
|
||||||
func BucketsHandler(s3 *minio.Client) http.Handler {
|
func BucketsHandler(s3 *minio.Client) http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
lp := path.Join("views", "layout.html")
|
l := path.Join("views", "layout.html")
|
||||||
p := path.Join("views", "buckets.html")
|
p := path.Join("views", "buckets.html")
|
||||||
|
|
||||||
t, err := template.ParseFiles(lp, p)
|
t, err := template.ParseFiles(l, p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := "error parsing templates"
|
msg := "error parsing templates"
|
||||||
web.HandleHTTPError(w, msg, err, http.StatusInternalServerError)
|
web.HandleHTTPError(w, msg, err, http.StatusInternalServerError)
|
||||||
|
|
Loading…
Reference in a new issue