aboutsummaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:55:23 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:55:23 +0200
commit3b21449468a1b20b3ff706fe00a04556a804e627 (patch)
tree8054ddc0f47f5731aa89ecb65b962da75a56bdaa /parser
parent1507d12b6398448c53bdffe18a32018a3ef627e7 (diff)
downloadapkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.tar.gz
apkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.tar.bz2
apkdoc-3b21449468a1b20b3ff706fe00a04556a804e627.zip
ref: Remove quicktemplate
This is done in preparation to use text-html/template. This will allow the user to input their own template file
Diffstat (limited to 'parser')
-rw-r--r--parser/parser.go6
1 files changed, 6 insertions, 0 deletions
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
}