From 68620c1e51a7a9339eafdcf7cf45aaf0e20bf0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20R=C3=BCttimann?= Date: Wed, 1 Jan 2020 18:02:31 +0100 Subject: [PATCH] make converter be able to handle multiple requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ramon Rüttimann --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index fa0ac73..d97c622 100644 --- a/main.go +++ b/main.go @@ -30,10 +30,8 @@ func main() { } func conversionHandler() http.HandlerFunc { - conv := converter.New(iTunesDir) - return func(w http.ResponseWriter, r *http.Request) { - if err := conv.Process(r.Body); err != nil { + if err := converter.New(iTunesDir).Process(r.Body); err != nil { klog.Errorf("could not convert: %v", err) fmt.Fprintf(w, "could not convert: %v", err) }