Commit of all existing code.

This commit is contained in:
2024-12-06 11:55:31 -07:00
commit 1f7234997b
17 changed files with 498 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package opds
import (
"github.com/lann/builder"
"golang.org/x/tools/blog/atom"
)
type textBuilder builder.Builder
func (t textBuilder) Type(textType string) textBuilder {
return builder.Set(t, "Type", textType).(textBuilder)
}
func (t textBuilder) Body(body string) textBuilder {
return builder.Set(t, "Body", body).(textBuilder)
}
func (t textBuilder) Build() atom.Text {
return builder.GetStruct(t).(atom.Text)
}
// TextBuilder is a fluent immutable builder to build OPDS texts
var TextBuilder = builder.Register(textBuilder{}, atom.Text{}).(textBuilder)