base.go 413 B

123456789101112131415161718192021222324
  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. URL string
  15. WebURL string
  16. }
  17. func (h Handler) FuncMap(w http.ResponseWriter, r *http.Request) template.FuncMap {
  18. return template.FuncMap{}
  19. }