diff options
Diffstat (limited to 'http_handle_repo_raw.go')
-rw-r--r-- | http_handle_repo_raw.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go index 54ca931..ea2925c 100644 --- a/http_handle_repo_raw.go +++ b/http_handle_repo_raw.go @@ -36,18 +36,19 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params return } - if files != nil { + switch { + case files != nil: params["files"] = files params["readme_filename"] = "README.md" params["readme"] = template.HTML("<p>README rendering here is WIP again</p>") // TODO renderTemplate(writer, "repo_raw_dir", params) - } else if content != "" { + case content != "": if redirectNoDir(writer, request) { return } writer.Header().Set("Content-Type", "application/octet-stream") fmt.Fprint(writer, content) - } else { + default: errorPage500(writer, params, "Unknown error fetching repo raw data") } } |