From 9e07a87fcba5e6b0986cd2dad1fa3d644ff4edc7 Mon Sep 17 00:00:00 2001 From: clonefetch <166312854+clonefetch@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:19:02 +0800 Subject: [PATCH] chore: fix function names in comment (#5478) --- weed/ftpd/ftp_server.go | 2 +- weed/s3api/auth_signature_v4.go | 2 +- weed/s3api/auto_signature_v4_test.go | 2 +- weed/s3api/s3api_bucket_handlers.go | 2 +- weed/util/skiplist/skiplist.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/weed/ftpd/ftp_server.go b/weed/ftpd/ftp_server.go index d51f3624d..7334fa3c7 100644 --- a/weed/ftpd/ftp_server.go +++ b/weed/ftpd/ftp_server.go @@ -29,7 +29,7 @@ type SftpServer struct { var _ = ftpserver.MainDriver(&SftpServer{}) -// NewServer returns a new FTP server driver +// NewFtpServer returns a new FTP server driver func NewFtpServer(ftpListener net.Listener, option *FtpServerOption) (*SftpServer, error) { var err error server := &SftpServer{ diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.go index 04548cc6f..0a156cfce 100644 --- a/weed/s3api/auth_signature_v4.go +++ b/weed/s3api/auth_signature_v4.go @@ -311,7 +311,7 @@ func parseSignature(signElement string) (string, s3err.ErrorCode) { return signature, s3err.ErrNone } -// doesPolicySignatureMatch - Verify query headers with post policy +// doesPolicySignatureV4Match - Verify query headers with post policy // - http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html // // returns ErrNone if the signature matches. diff --git a/weed/s3api/auto_signature_v4_test.go b/weed/s3api/auto_signature_v4_test.go index ccee8b885..6ff67b5bf 100644 --- a/weed/s3api/auto_signature_v4_test.go +++ b/weed/s3api/auto_signature_v4_test.go @@ -262,7 +262,7 @@ func getMD5HashBase64(data []byte) string { return base64.StdEncoding.EncodeToString(getMD5Sum(data)) } -// getSHA256Hash returns SHA-256 sum of given data. +// getSHA256Sum returns SHA-256 sum of given data. func getSHA256Sum(data []byte) []byte { hash := sha256.New() hash.Write(data) diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index bb3939571..04e1e00a4 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -351,7 +351,7 @@ func (s3a *S3ApiServer) PutBucketLifecycleConfigurationHandler(w http.ResponseWr } -// DeleteBucketMetricsConfiguration Delete Bucket Lifecycle +// DeleteBucketLifecycleHandler Delete Bucket Lifecycle // https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html func (s3a *S3ApiServer) DeleteBucketLifecycleHandler(w http.ResponseWriter, r *http.Request) { diff --git a/weed/util/skiplist/skiplist.go b/weed/util/skiplist/skiplist.go index 21eed4b43..befb0389c 100644 --- a/weed/util/skiplist/skiplist.go +++ b/weed/util/skiplist/skiplist.go @@ -26,7 +26,7 @@ type SkipList struct { // elementCount int } -// NewSeedEps returns a new empty, initialized Skiplist. +// NewSeed returns a new empty, initialized Skiplist. // Given a seed, a deterministic height/list behaviour can be achieved. // Eps is used to compare keys given by the ExtractKey() function on equality. func NewSeed(seed int64, listStore ListStore) *SkipList {