From d77b81ec36a6995af6a8039121d19802bab8352e Mon Sep 17 00:00:00 2001 From: s Date: Tue, 18 Nov 2025 06:36:53 -0500 Subject: chore: remove api documentation and refactor github leads + crawl commands to add new parameters --- internal/client/crawl.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/client/crawl.go') 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) -- cgit v1.2.3