From 3b21449468a1b20b3ff706fe00a04556a804e627 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 3 Sep 2023 14:55:23 +0200 Subject: ref: Remove quicktemplate This is done in preparation to use text-html/template. This will allow the user to input their own template file --- parser/parser.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'parser') diff --git a/parser/parser.go b/parser/parser.go index 8996b8c..62b0d85 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -1,6 +1,7 @@ package parser import ( + "fmt" "strconv" "strings" "time" @@ -29,6 +30,11 @@ type ( } ) +func (e *Entry) FomartLink(format string) string { + c := strings.Replace(*e.Commit, "-dirty", "", -1) + return fmt.Sprintf(format, c, *e.Origin) +} + func ptr[T any](v T) *T { return &v } -- cgit v1.2.3