ipv6-test-backend/pkg/restyHttp/client.go
2024-08-17 08:31:47 +08:00

19 lines
219 B
Go

package restyHttp
import (
"github.com/go-resty/resty/v2"
"sync"
)
var (
once sync.Once
client *resty.Client
)
func GetHttpClient() *resty.Client {
once.Do(func() {
client = resty.New()
})
return client
}