build(golatt): upgrade to 0.4.0

This commit is contained in:
Anhgelus Morhtuuzh 2025-02-24 15:05:36 +01:00
parent c6fd25a841
commit 9ea75094de
No known key found for this signature in database
GPG key ID: CAD341EFA92DDDE5
3 changed files with 12 additions and 4 deletions

2
go.mod
View file

@ -2,6 +2,6 @@ module now
go 1.24
require github.com/anhgelus/golatt v0.3.1-0.20250224013601-7215f78c2860
require github.com/anhgelus/golatt v0.4.0
require github.com/gorilla/mux v1.8.1 // indirect

4
go.sum
View file

@ -6,5 +6,9 @@ github.com/anhgelus/golatt v0.3.0 h1:HjolihJ+S9egfTXcbk3YBfxBKmEcEraUsqCsrPXzHOU
github.com/anhgelus/golatt v0.3.0/go.mod h1:Lgyy/Tm9A3w1ft72mZOUxl/p+4G2/WB3qxoXTv7Y4y8=
github.com/anhgelus/golatt v0.3.1-0.20250224013601-7215f78c2860 h1:Xi1aqbDU1sr/8pJEun4sjOqz5PPQc7hVSR1kuCiRgTE=
github.com/anhgelus/golatt v0.3.1-0.20250224013601-7215f78c2860/go.mod h1:Lgyy/Tm9A3w1ft72mZOUxl/p+4G2/WB3qxoXTv7Y4y8=
github.com/anhgelus/golatt v0.3.1-0.20250224134406-139fb679dfbe h1:5tOWGCqgDHY3zxdTYBLAjmRhwVJBeBobf+4TJTLB8II=
github.com/anhgelus/golatt v0.3.1-0.20250224134406-139fb679dfbe/go.mod h1:yC4OU6rMSbHKsfcvN7jYSyGsnpbivHKDGVFohZI5VH4=
github.com/anhgelus/golatt v0.3.1-0.20250224140223-d0258a5fba9f h1:SwvbWm/6oeHs8KzadqC3P3mFTgilkMZz2O5Glxtsq6s=
github.com/anhgelus/golatt v0.3.1-0.20250224140223-d0258a5fba9f/go.mod h1:yC4OU6rMSbHKsfcvN7jYSyGsnpbivHKDGVFohZI5VH4=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=

10
main.go
View file

@ -60,16 +60,20 @@ func main() {
}
var g *golatt.Golatt
if dev {
g = golatt.New(templates, os.DirFS("public"), os.DirFS("dist"))
g = golatt.New(golatt.UsableEmbedFS("templates", templates), os.DirFS("public"), os.DirFS("dist"))
} else {
g = golatt.New(templates, os.DirFS("public"), golatt.UsableEmbedFS("dist", assets))
g = golatt.New(
golatt.UsableEmbedFS("templates", templates),
os.DirFS("public"),
golatt.UsableEmbedFS("dist", assets),
)
}
g.DefaultSeoData = &golatt.SeoData{
Image: cfg.Image,
Description: cfg.Description,
Domain: domain,
}
g.Templates = append(g.Templates, "templates/base/*.gohtml")
g.Templates = append(g.Templates, "base/*.gohtml")
g.NewTemplate("index", "/", cfg.Person.Name, "", "", &cfg).Handle()
g.NewTemplate("legal",