Documentation ¶
Index ¶
- func HandleJSON(w http.ResponseWriter, r *http.Request, ...)
- func IsTCPAddrServing(url string, timeout time.Duration) (bool, error)
- func ParamErrorf(format string, args ...interface{}) error
- func ServePort(port int, autoIncrPort bool, watchTimeout time.Duration, watch func(port int), ...) error
- func ServePortHTTP(server *http.ServeMux, port int, autoIncrPort bool, watchTimeout time.Duration, ...) error
- func SetCORSHeaders(w http.ResponseWriter)
- type HttpStatusErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleJSON ¶ added in v1.0.37
func ParamErrorf ¶ added in v1.0.37
func ServePort ¶
func ServePort(port int, autoIncrPort bool, watchTimeout time.Duration, watch func(port int), doWithPort func(port int) error) error
suggested watch timeout: 500ms
func ServePortHTTP ¶ added in v1.0.37
func SetCORSHeaders ¶ added in v1.0.37
func SetCORSHeaders(w http.ResponseWriter)
allow request from arbitrary host
Types ¶
type HttpStatusErr ¶ added in v1.0.37
Click to show internal directories.
Click to hide internal directories.