aboutsummaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 21:33:46 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 21:33:46 +0200
commit08dcb18a941a80a3b37c14c8d64dd3a229e86ab1 (patch)
tree85f8b38ffab2a8d259490ea9ec9d51fe78f3c94b /template.go
parentf361e53f711fe207c6a67c81af4507363345ef3b (diff)
downloadapkdoc-08dcb18a941a80a3b37c14c8d64dd3a229e86ab1.tar.gz
apkdoc-08dcb18a941a80a3b37c14c8d64dd3a229e86ab1.tar.bz2
apkdoc-08dcb18a941a80a3b37c14c8d64dd3a229e86ab1.zip
ref: Better handle and outputs errors
Diffstat (limited to 'template.go')
-rw-r--r--template.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/template.go b/template.go
index 503af64..8d84f2e 100644
--- a/template.go
+++ b/template.go
@@ -1,6 +1,7 @@
package main
import (
+ "errors"
html "html/template"
"io"
"os"
@@ -39,6 +40,6 @@ func GetTemplate(templateType, filePath string) (Templater, error) {
Funcs(templateFunc).
Parse(string(tmpl))
default:
- panic("Invalid template-type")
+ return nil, errors.New("Invalid template type")
}
}