From 804a3b9848b21b4e9e3920f78f23a3a812f484de Mon Sep 17 00:00:00 2001 From: Johannes Steu Date: Thu, 16 May 2024 17:00:53 +0200 Subject: [PATCH] chore: add WithName option --- http/http_endpoint.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/http/http_endpoint.go b/http/http_endpoint.go index 301ae7c..b94f910 100644 --- a/http/http_endpoint.go +++ b/http/http_endpoint.go @@ -117,6 +117,13 @@ func WithValidateResponse(validate func(res *http.Response) error) HTTPEndpointO } } +// WithName allows manually setting the endpoint name +func WithName(name string) HTTPEndpointOption { + return func(options *EndpointOptions) { + options.name = name + } +} + // NewEndpoint creates a new HTTP based loadtest endpoint. // // To configure it you can use the functional options.