Registry / testing / appleboy-gofight-v2

appleboy-gofight-v2

JSON →
library2.2.2gogounverified

Package gofight offers simple API HTTP handler testing for Go frameworks.

go get github.com/appleboy/gofight/v2
INSTALL
IMPORT
SIG · APPLEBOY-GOFIGHT-V
A
appleboy-gofight-v2
testinggov2.2.2
harness data pending
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.

Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
appleboy-gofight-v2 — go get appleboy-gofight-v2 · libregistry