chore: expose client base url
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d2228a0935
commit
a0dee7c40a
2 changed files with 8 additions and 0 deletions
|
|
@ -117,6 +117,11 @@ type Client struct {
|
|||
rateLimit RateLimit
|
||||
}
|
||||
|
||||
// BaseURL returns the configured Forgejo base URL.
|
||||
func (c *Client) BaseURL() string {
|
||||
return c.baseURL
|
||||
}
|
||||
|
||||
// RateLimit returns the last known rate limit information.
|
||||
func (c *Client) RateLimit() RateLimit {
|
||||
return c.rateLimit
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ func TestForge_Client_Good(t *testing.T) {
|
|||
if c.baseURL != "https://forge.lthn.ai" {
|
||||
t.Errorf("got baseURL=%q", c.baseURL)
|
||||
}
|
||||
if got := c.BaseURL(); got != "https://forge.lthn.ai" {
|
||||
t.Errorf("got BaseURL()=%q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRepoService_ListOrgRepos_Good(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue