From 44bc8e4078a09857ad86691a83e7ba7d4e3a69c4 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sun, 7 Jul 2024 20:28:42 +0200 Subject: ref: Simplify path builder code --- templates/tags.qtpl.go | 154 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 templates/tags.qtpl.go (limited to 'templates/tags.qtpl.go') diff --git a/templates/tags.qtpl.go b/templates/tags.qtpl.go new file mode 100644 index 0000000..7d8eca8 --- /dev/null +++ b/templates/tags.qtpl.go @@ -0,0 +1,154 @@ +// Code generated by qtc from "tags.qtpl". DO NOT EDIT. +// See https://github.com/valyala/quicktemplate for details. + +//line tags.qtpl:1 +package templates + +//line tags.qtpl:1 +import "git.gabrielgio.me/cerrado/pkg/git" + +//line tags.qtpl:3 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + +//line tags.qtpl:3 +var ( + _ = qtio422016.Copy + _ = qt422016.AcquireByteBuffer +) + +//line tags.qtpl:3 +func StreamListTags(qw422016 *qt422016.Writer, name string, tags []*git.TagReference) { +//line tags.qtpl:3 + qw422016.N().S(` +`) +//line tags.qtpl:4 + if len(tags) > 0 { +//line tags.qtpl:4 + qw422016.N().S(` +
+ `) +//line tags.qtpl:6 + for _, t := range tags { +//line tags.qtpl:6 + qw422016.N().S(` +
+ + `) +//line tags.qtpl:20 + if t.Message() != "" { +//line tags.qtpl:20 + qw422016.N().S(` +
+
`)
+//line tags.qtpl:22
+				qw422016.E().S(t.Message())
+//line tags.qtpl:22
+				qw422016.N().S(`
+
+ `) +//line tags.qtpl:24 + } +//line tags.qtpl:24 + qw422016.N().S(` +
+ `) +//line tags.qtpl:26 + } +//line tags.qtpl:26 + qw422016.N().S(` +
+`) +//line tags.qtpl:28 + } else { +//line tags.qtpl:28 + qw422016.N().S(` +

No tags

+`) +//line tags.qtpl:30 + } +//line tags.qtpl:30 + qw422016.N().S(` +`) +//line tags.qtpl:31 +} + +//line tags.qtpl:31 +func WriteListTags(qq422016 qtio422016.Writer, name string, tags []*git.TagReference) { +//line tags.qtpl:31 + qw422016 := qt422016.AcquireWriter(qq422016) +//line tags.qtpl:31 + StreamListTags(qw422016, name, tags) +//line tags.qtpl:31 + qt422016.ReleaseWriter(qw422016) +//line tags.qtpl:31 +} + +//line tags.qtpl:31 +func ListTags(name string, tags []*git.TagReference) string { +//line tags.qtpl:31 + qb422016 := qt422016.AcquireByteBuffer() +//line tags.qtpl:31 + WriteListTags(qb422016, name, tags) +//line tags.qtpl:31 + qs422016 := string(qb422016.B) +//line tags.qtpl:31 + qt422016.ReleaseByteBuffer(qb422016) +//line tags.qtpl:31 + return qs422016 +//line tags.qtpl:31 +} -- cgit v1.2.3