diff options
Diffstat (limited to 'template_funcs.go')
-rw-r--r-- | template_funcs.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/template_funcs.go b/template_funcs.go index 3c5ca0b..1c68650 100644 --- a/template_funcs.go +++ b/template_funcs.go @@ -1,8 +1,15 @@ package main -import "strings" +import ( + "path/filepath" + "strings" +) func first_line(s string) string { before, _, _ := strings.Cut(s, "\n") return before } + +func base_name (s string) string { + return filepath.Base(s) +} |