gitea/client/base.go
cloudchamb3r 88f4754d06
디스커션 API 클라이언트 구현 (#26)
* feat. add discussion clients...

* apply feedback
2024-08-01 23:14:12 +09:00

16 lines
271 B
Go

package client
import (
"code.gitea.io/gitea/modules/setting"
"github.com/go-resty/resty/v2"
)
var client *resty.Client = nil
func Request() *resty.Request {
if client == nil {
client = resty.New().SetBaseURL(setting.DiscussionServer.Url)
}
return client.R()
}