aboutsummaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
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
}