base.go 463 B

1234567891011121314151617181920212223242526
  1. package base
  2. import (
  3. "context"
  4. "html/template"
  5. "net/http"
  6. "github.com/vladimirok5959/golang-ip2location/internal/client"
  7. )
  8. type Handler struct {
  9. Client *client.Client
  10. Shutdown context.CancelFunc
  11. }
  12. type ServerData struct {
  13. Additional interface{}
  14. AppVersion string
  15. AssetsVersion int
  16. URL string
  17. WebURL string
  18. }
  19. func (h Handler) FuncMap(w http.ResponseWriter, r *http.Request) template.FuncMap {
  20. return template.FuncMap{}
  21. }