partage

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/partage.git
Log | Files | Refs

commit c40d677bd5eddc22019fe775981466895821a684
parent da39b8c42667a9eb0676c1b96b387d2c3f1198b5
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue, 19 Oct 2021 08:00:29 +0200

Remove useless function contenttype()

Diffstat:
Mpartage.go | 13-------------
1 file changed, 0 insertions(+), 13 deletions(-)

diff --git a/partage.go b/partage.go @@ -42,19 +42,6 @@ var conf struct { } -func contenttype(f *os.File) string { - buffer := make([]byte, 512) - - _, err := f.Read(buffer) - if err != nil { - return "" - } - - mime := http.DetectContentType(buffer) - - return mime -} - func writefile(f *os.File, s io.ReadCloser, contentlength int64) error { buffer := make([]byte, 4096) eof := false