From 13211af256aa73d36189a52d865af009e4c7c336 Mon Sep 17 00:00:00 2001 From: zhuhaicity Date: Sun, 12 Jan 2025 15:07:04 +0800 Subject: [PATCH] chore: fix some function names in comment Signed-off-by: zhuhaicity --- api/http_client.go | 2 +- pkg/cmdutil/errors.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/http_client.go b/api/http_client.go index e9381fa85..146b96df6 100644 --- a/api/http_client.go +++ b/api/http_client.go @@ -86,7 +86,7 @@ func AddCacheTTLHeader(rt http.RoundTripper, ttl time.Duration) http.RoundTrippe }} } -// AddAuthToken adds an authentication token header for the host specified by the request. +// AddAuthTokenHeader adds an authentication token header for the host specified by the request. func AddAuthTokenHeader(rt http.RoundTripper, cfg tokenGetter) http.RoundTripper { return &funcTripper{roundTrip: func(req *http.Request) (*http.Response, error) { // If the header is already set in the request, don't overwrite it. diff --git a/pkg/cmdutil/errors.go b/pkg/cmdutil/errors.go index 26a059d25..edb97abcd 100644 --- a/pkg/cmdutil/errors.go +++ b/pkg/cmdutil/errors.go @@ -13,7 +13,7 @@ func FlagErrorf(format string, args ...interface{}) error { return FlagErrorWrap(fmt.Errorf(format, args...)) } -// FlagError returns a new FlagError that wraps the specified error. +// FlagErrorWrap returns a new FlagError that wraps the specified error. func FlagErrorWrap(err error) error { return &FlagError{err} } // A *FlagError indicates an error processing command-line flags or other arguments.