ipv6-test-backend/internal/pkg/restyHttp/client.go

19 lines
219 B
Go
Raw Normal View History

2024-08-17 08:31:47 +08:00
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
}