diff options
| author | s <[email protected]> | 2025-11-18 06:36:53 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-18 06:36:53 -0500 |
| commit | d77b81ec36a6995af6a8039121d19802bab8352e (patch) | |
| tree | f898f85631367b899ae3c75fbd117f185d07233d /internal/client/crawl.go | |
| parent | 76d0cff639988ca506b1dc6e848841944c96b263 (diff) | |
| download | dborg-d77b81ec36a6995af6a8039121d19802bab8352e.tar.gz dborg-d77b81ec36a6995af6a8039121d19802bab8352e.zip | |
chore: remove api documentation and refactor github leads + crawl commands to add new parametersv0.8.5
Diffstat (limited to 'internal/client/crawl.go')
| -rw-r--r-- | internal/client/crawl.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/client/crawl.go b/internal/client/crawl.go index f33fbcd..330bb88 100644 --- a/internal/client/crawl.go +++ b/internal/client/crawl.go @@ -8,10 +8,16 @@ import ( "net/url" ) -func (c *Client) CrawlDomain(domain string, callback func(line string) error) error { +func (c *Client) CrawlDomain(domain string, subdomains bool, callback func(line string) error) error { path := fmt.Sprintf("/crawl/%s", url.PathEscape(domain)) fullURL := c.config.BaseURL + path + if subdomains { + params := url.Values{} + params.Set("subdomains", "true") + fullURL += "?" + params.Encode() + } + req, err := http.NewRequest(http.MethodGet, fullURL, nil) if err != nil { return fmt.Errorf("failed to create request: %w", err) |
