handler.go 588 B

1234567891011121314151617181920212223242526
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package ui // import "miniflux.app/v2/internal/ui"
  4. import (
  5. "fmt"
  6. "miniflux.app/v2/internal/storage"
  7. "miniflux.app/v2/internal/template"
  8. "miniflux.app/v2/internal/worker"
  9. )
  10. type handler struct {
  11. basePath string
  12. store *storage.Storage
  13. tpl *template.Engine
  14. pool *worker.Pool
  15. }
  16. func (h *handler) routePath(format string, args ...any) string {
  17. if len(args) > 0 {
  18. return h.basePath + fmt.Sprintf(format, args...)
  19. }
  20. return h.basePath + format
  21. }