diff --git a/v2/examples/main.go b/v2/examples/main.go index d6baf9d91..da5a25c64 100644 --- a/v2/examples/main.go +++ b/v2/examples/main.go @@ -5,8 +5,10 @@ import ( "context" "io" "log" + "strconv" "github.com/projectdiscovery/subfinder/v2/pkg/runner" + contextutil "github.com/projectdiscovery/utils/context" ) func main() { @@ -31,7 +33,8 @@ func main() { output := &bytes.Buffer{} // To run subdomain enumeration on a single domain - if err = subfinder.EnumerateSingleDomainWithCtx(context.Background(), "hackerone.com", []io.Writer{output}); err != nil { + ctx, _ := contextutil.WithValues(context.Background(), contextutil.ContextArg("All"), contextutil.ContextArg(strconv.FormatBool(subfinderOpts.All))) + if err = subfinder.EnumerateSingleDomainWithCtx(ctx, "hackerone.com", []io.Writer{output}); err != nil { log.Fatalf("failed to enumerate single domain: %v", err) }