From d1b1c23e4ed60c2be018e4d5e53b825f3e4cb173 Mon Sep 17 00:00:00 2001 From: threehonor Date: Wed, 26 Mar 2025 11:03:43 +0800 Subject: [PATCH] chore: fix some function names in comment Signed-off-by: threehonor --- pkg/protocols/utils/utils.go | 2 +- pkg/templates/templates.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/protocols/utils/utils.go b/pkg/protocols/utils/utils.go index 9f65b7b6ac..ed39a9b154 100644 --- a/pkg/protocols/utils/utils.go +++ b/pkg/protocols/utils/utils.go @@ -48,7 +48,7 @@ func CalculateContentLength(contentLength, bodyLength int64) int64 { return bodyLength } -// headersToString converts http headers to string +// HeadersToString converts http headers to string func HeadersToString(headers http.Header) string { builder := &strings.Builder{} diff --git a/pkg/templates/templates.go b/pkg/templates/templates.go index c15eb2f5e5..942988cf80 100644 --- a/pkg/templates/templates.go +++ b/pkg/templates/templates.go @@ -317,7 +317,7 @@ func (template *Template) MarshalYAML() ([]byte, error) { return out, multierr.Append(marshalErr, errValidate) } -// MarshalYAML forces recursive struct validation after unmarshal operation +// UnmarshalYAML forces recursive struct validation after unmarshal operation func (template *Template) UnmarshalYAML(unmarshal func(interface{}) error) error { type Alias Template alias := &Alias{} @@ -475,7 +475,7 @@ func (template *Template) GetFileImports() []string { return template.ImportedFiles } -// addProtocolsToQueue adds protocol requests to the queue and preserves order of the protocols and requests +// addRequestsToQueue adds protocol requests to the queue and preserves order of the protocols and requests func (template *Template) addRequestsToQueue(keys ...string) { for _, key := range keys { switch key {