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