http_test.go 407 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. "flag"
  4. "fmt"
  5. "go-common/app/service/openplatform/anti-fraud/conf"
  6. httpx "go-common/library/net/http/blademaster"
  7. _ "github.com/smartystreets/goconvey/convey"
  8. )
  9. var client *httpx.Client
  10. func init() {
  11. flag.Parse()
  12. if err := conf.Init(); err != nil {
  13. panic(fmt.Errorf("conf.Init() error(%v)", err))
  14. }
  15. client = httpx.NewClient(conf.Conf.HTTPClient.Read)
  16. Init(conf.Conf)
  17. }