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) }