feat: include app version in sidebar footer
All checks were successful
Deploy / build-and-deploy (push) Successful in 1m0s

This commit is contained in:
juancwu 2026-02-09 21:51:16 +00:00
commit b47e48b882
7 changed files with 46 additions and 7 deletions

View file

@ -33,9 +33,11 @@ type Config struct {
MailerEmailFrom string
SupportEmail string
Version string
}
func Load() *Config {
func Load(version string) *Config {
if err := godotenv.Load(); err != nil {
slog.Info("no .env file found, using environment variables")
@ -65,6 +67,8 @@ func Load() *Config {
MailerEmailFrom: envString("MAILER_EMAIL_FROM", ""),
SupportEmail: envString("SUPPORT_EMAIL", ""),
Version: version,
}
return cfg
@ -87,6 +91,8 @@ func (c *Config) Sanitized() *Config {
MailerEmailFrom: c.MailerEmailFrom,
SupportEmail: c.SupportEmail,
Version: c.Version,
}
}