Use fsx package and friends from pkglib

This commit is contained in:
Tom Wiesing 2023-04-08 17:51:17 +02:00
parent 1f8c55da7c
commit 0f6803f890
No known key found for this signature in database
35 changed files with 91 additions and 493 deletions

View file

@ -11,7 +11,6 @@ import (
"github.com/FAU-CDI/wisski-distillery/internal/dis/component/server/templating"
"github.com/FAU-CDI/wisski-distillery/internal/status"
"github.com/tkw1536/pkglib/httpx"
"github.com/tkw1536/pkglib/pools"
)
//go:embed "public.html"
@ -62,8 +61,7 @@ func (home *Home) publicHandler(ctx context.Context) http.Handler {
}
// get a builder
builder := pools.GetBuilder()
defer pools.ReleaseBuilder(builder)
var builder strings.Builder
// prepare about
pc.aboutContext.Logo = logoHTML
@ -72,7 +70,7 @@ func (home *Home) publicHandler(ctx context.Context) http.Handler {
// render the about template
if err := about.Execute(builder, pc.aboutContext); err != nil {
if err := about.Execute(&builder, pc.aboutContext); err != nil {
return pc, nil
}