From 187485a9a168149a1e51d16130b88d4db7b76dc0 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Tue, 10 Apr 2018 17:09:59 +0200 Subject: [PATCH] small refactoring of process package --- app/converter/process/process.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/converter/process/process.go b/app/converter/process/process.go index 9d596f14..3acc4f8b 100644 --- a/app/converter/process/process.go +++ b/app/converter/process/process.go @@ -41,22 +41,22 @@ func Unconv(workingDir string, file *gfile.File) (string, error) { } var ( - cmdTemplate *template.Template cmdTimeout int + cmdTemplate *template.Template ) switch file.Type { case gfile.MarkdownType: - cmdTemplate = commandsConfig.Markdown.Template cmdTimeout = commandsConfig.Markdown.Timeout + cmdTemplate = commandsConfig.Markdown.Template break case gfile.HTMLType: - cmdTemplate = commandsConfig.HTML.Template cmdTimeout = commandsConfig.HTML.Timeout + cmdTemplate = commandsConfig.HTML.Template break case gfile.OfficeType: - cmdTemplate = commandsConfig.Office.Template cmdTimeout = commandsConfig.Office.Timeout + cmdTemplate = commandsConfig.Office.Template break default: return "", &impossibleConversionError{} @@ -88,8 +88,8 @@ func Merge(workingDir string, filesPaths []string) (string, error) { ResultFilePath: gfile.MakeFilePath(workingDir, ".pdf"), } - cmdTemplate := commandsConfig.Merge.Template cmdTimeout := commandsConfig.Merge.Timeout + cmdTemplate := commandsConfig.Merge.Template var data bytes.Buffer if err := cmdTemplate.Execute(&data, cmdData); err != nil {