diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 14:55:23 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 14:55:23 +0200 |
commit | 3b21449468a1b20b3ff706fe00a04556a804e627 (patch) | |
tree | 8054ddc0f47f5731aa89ecb65b962da75a56bdaa /parser | |
parent | 1507d12b6398448c53bdffe18a32018a3ef627e7 (diff) | |
download | apkdoc-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.go | 6 |
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 } |