From 31e638d283664c1e04d189edd732f5d9ae4fbeea Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 10 Feb 2025 08:47:01 +0800 Subject: repo_index: Use the first line of the commit message --- template_funcs.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 template_funcs.go (limited to 'template_funcs.go') 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 +} -- cgit v1.2.3