top

Package gofight offers simple API http handler testing for Golang framework.

Details about the gofight project are found in github page:

https://github.com/appleboy/gofight

Installation:

$ go get -u github.com/appleboy/gofight

Set Header: You can add custom header via SetHeader func.

SetHeader(gofight.H{
  "X-Version": version,
})

Set query string: Using SetQuery to generate query string data.

SetQuery(gofight.H{
  "a": "1",
  "b": "2",
})

POST FORM Data: Using SetForm to generate form data.

SetForm(gofight.H{
  "a": "1",
  "b": "2",
})

POST JSON Data: Using SetJSON to generate json data.

SetJSON(gofight.H{
  "a": "1",
  "b": "2",
})

POST RAW Data: Using SetBody to generate raw data.

SetBody("a=1&b=1")

For more details, see the documentation and example.

Imported only in test by 12 package(s)

  1. github.com/256dpi/fire
  2. github.com/apaganobeleno/gofight/example
  3. github.com/appleboy/go-hello
  4. github.com/appleboy/gofight/example
  5. github.com/ararog/petshop
  6. github.com/futurez/gorush/gorush
  7. github.com/jhzlf/gorush/gorush
  8. github.com/muhproductions/muh
  9. github.com/timmyArch/muh-api
  10. gopkg.in/appleboy/gin-jwt.v1
  11. gopkg.in/appleboy/gofight.v1/example
  12. gopkg.in/appleboy/gofight.v2/example

Imports 4 package(s)

  1. github.com/stretchr/testify/assert
  2. github.com/labstack/echo
  3. github.com/labstack/echo/engine
  4. github.com/labstack/echo/test

Test imports 3 package(s)

  1. github.com/appleboy/gofight/framework
  2. github.com/buger/jsonparser
  3. github.com/gin-gonic/gin