refactor and remove useless stuff

This commit is contained in:
Henrique Dias committed 2017-06-27 14:49:46 +01:00
1 parent 6e04c97bb9
commit 06c4e4d58b
4 files changed
+6 -17

No files matched your search

+2 -2
View File
@@ -13,8 +13,8 @@ import (
"os"
)
// checksum calculates the hash of a file. Supports MD5, SHA1, SHA256 and SHA512.
func checksum(c *requestContext, w http.ResponseWriter, r *http.Request) (int, error) {
// serveChecksum calculates the hash of a file. Supports MD5, SHA1, SHA256 and SHA512.
func serveChecksum(c *requestContext, w http.ResponseWriter, r *http.Request) (int, error) {
query := r.URL.Query().Get("checksum")
file, err := os.Open(c.fi.Path)