chore: optimize SEO and fix golangci-lint issues

- Implement dynamic SEO meta tags and sitemap.xml for toolbox.pengzhan.dev
- Fix SPA title/meta refresh issue in layout.html
- Address golangci-lint findings:
  - Refactor switch-case for tool path and SVG token parsing
  - Replace math.Pow with direct multiplication for performance
  - Fix unhandled error returns and unused imports
  - Omit redundant type declarations
This commit is contained in:
2026-03-01 09:54:04 -08:00
parent c3d0dee806
commit 5c185da0a9
9 changed files with 657 additions and 229 deletions
+6 -4
View File
@@ -16,10 +16,12 @@ func init() {
base.Register(&learnNumberTool{})
}
func (t *learnNumberTool) ID() string { return "learn-number" }
func (t *learnNumberTool) Name() string { return "幼儿数学助手" }
func (t *learnNumberTool) Description() string { return "包含数图形、基础加减法等趣味数学练习" }
func (t *learnNumberTool) Emoji() string { return "🔢" }
func (t *learnNumberTool) ID() string { return "learn-number" }
func (t *learnNumberTool) Name() string { return "幼儿数学助手" }
func (t *learnNumberTool) Description() string {
return "包含数图形、基础加减法等趣味数学练习"
}
func (t *learnNumberTool) Emoji() string { return "🔢" }
func (t *learnNumberTool) Init() error {
fmt.Println("Initializing Learn-Number tool...")