Documentation ¶
Index ¶
- func FileServer(r chi.Router, path string, root http.FileSystem)
- func Host(r *http.Request) string
- func Request(uri string) ([]byte, []byte, error)
- func RequestHtml(uri string) (*goquery.Document, error)
- func RequestJson(uri string, v any) error
- func WriteJson(w http.ResponseWriter, data interface{})
- func WriteJsonStatus(w http.ResponseWriter, data interface{}, statusCode int)
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileServer ¶
func FileServer(r chi.Router, path string, root http.FileSystem)
FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem.
func RequestJson ¶
func WriteJson ¶
func WriteJson(w http.ResponseWriter, data interface{})
func WriteJsonStatus ¶
func WriteJsonStatus(w http.ResponseWriter, data interface{}, statusCode int)
Types ¶
Click to show internal directories.
Click to hide internal directories.