From 0337b33490a54e5ed31e35782bb763cf07e98453 Mon Sep 17 00:00:00 2001 From: jishudashen Date: Mon, 21 Jul 2025 14:13:22 +0800 Subject: [PATCH] chore: fix inconsistent function name in comment Signed-off-by: jishudashen --- pkg/protocols/protocols.go | 2 +- pkg/protocols/utils/http/requtils.go | 2 +- pkg/templates/signer/handler.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/protocols/protocols.go b/pkg/protocols/protocols.go index 197d79e0a..702aa5729 100644 --- a/pkg/protocols/protocols.go +++ b/pkg/protocols/protocols.go @@ -157,7 +157,7 @@ func (e *ExecutorOptions) RateLimitTake() { } } -// GetThreadsForPayloadRequests returns the number of threads to use as default for +// GetThreadsForNPayloadRequests returns the number of threads to use as default for // given max-request of payloads func (e *ExecutorOptions) GetThreadsForNPayloadRequests(totalRequests int, currentThreads int) int { if currentThreads > 0 { diff --git a/pkg/protocols/utils/http/requtils.go b/pkg/protocols/utils/http/requtils.go index 79e980bb7..bfc602a05 100644 --- a/pkg/protocols/utils/http/requtils.go +++ b/pkg/protocols/utils/http/requtils.go @@ -35,7 +35,7 @@ func UpdateURLPortFromPayload(parsed *urlutil.URL, data string) (*urlutil.URL, s return parsed, data } -// setHeader sets some headers only if the header wasn't supplied by the user +// SetHeader sets some headers only if the header wasn't supplied by the user func SetHeader(req *retryablehttp.Request, name, value string) { if _, ok := req.Header[name]; !ok { req.Header.Set(name, value) diff --git a/pkg/templates/signer/handler.go b/pkg/templates/signer/handler.go index 860719143..a263b181a 100644 --- a/pkg/templates/signer/handler.go +++ b/pkg/templates/signer/handler.go @@ -46,7 +46,7 @@ type KeyHandler struct { ecdsaKey *ecdsa.PrivateKey } -// ReadUserCert reads the user certificate from environment variable or given directory +// ReadCert reads the user certificate from environment variable or given directory func (k *KeyHandler) ReadCert(envName, dir string) error { // read from env if cert := k.getEnvContent(envName); cert != nil {