Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
gofight
✓ github.com/appleboy/gofight/v2
Test an HTTP handler using gofight.
package main
import (
"github.com/appleboy/gofight/v2"
"net/http"
)
func main() {
r := gofight.New()
r.GET("/").
SetHeader(gofight.H{"Content-Type": "application/json"}).
Run(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello"))
}), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) {
// assertions
})
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.2.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.