diff --git a/roles/home/aichat/roles/documentfunction.md b/roles/home/aichat/roles/documentfunction.md new file mode 100644 index 0000000..ae1b227 --- /dev/null +++ b/roles/home/aichat/roles/documentfunction.md @@ -0,0 +1,17 @@ +// ReplaceAllRequestParameters generates a new set of requests by replacing each parameter's value with the provided payload. +// +// This function iterates over all parameters in the given request and creates a new request for each parameter, +// replacing its value with the specified payload. The resulting requests are returned as a slice, leaving the original +// request unmodified. +// +// Parameters: +// - req (models.CrawlRequest): The original CrawlRequest containing parameters to be processed. +// - payload (string): The value to replace each parameter's value. +// +// Returns: +// - ([]models.CrawlRequest): A slice of new CrawlRequest instances, each with one parameter's value replaced by the payload. +// - (error): An error if any issue occurs during processing. +// +// Notes: +// - A new request is created for every parameter in the original request. +// - The function is side-effect free and does not modify the original `CrawlRequest`.