aboutsummaryrefslogtreecommitdiff
path: root/http_template_funcs.go
diff options
context:
space:
mode:
Diffstat (limited to 'http_template_funcs.go')
-rw-r--r--http_template_funcs.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/http_template_funcs.go b/http_template_funcs.go
new file mode 100644
index 0000000..19a92ec
--- /dev/null
+++ b/http_template_funcs.go
@@ -0,0 +1,15 @@
+package main
+
+import (
+ "path"
+ "strings"
+)
+
+func first_line(s string) string {
+ before, _, _ := strings.Cut(s, "\n")
+ return before
+}
+
+func base_name(s string) string {
+ return path.Base(s)
+}