From c6a0704019f88c0e64babcbf792ec3d6ef16b675 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 12 Nov 2020 13:30:08 -0800 Subject: [PATCH] rename function --- weed/s3api/filer_util.go | 2 +- weed/s3api/s3api_bucket_handlers.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go index 72df337a5..b6ac52c80 100644 --- a/weed/s3api/filer_util.go +++ b/weed/s3api/filer_util.go @@ -76,7 +76,7 @@ func (s3a *S3ApiServer) exists(parentDirectoryPath string, entryName string, isD } -func (s3a *S3ApiServer) get(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) { +func (s3a *S3ApiServer) getEntry(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) { fullPath := util.NewFullPath(parentDirectoryPath, entryName) return filer_pb.GetEntry(s3a, fullPath) } diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 6b2ed8ef2..ad50e7cca 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -120,7 +120,7 @@ func (s3a *S3ApiServer) DeleteBucketHandler(w http.ResponseWriter, r *http.Reque bucket, _ := getBucketAndObject(r) - entry, err := s3a.get(s3a.option.BucketsPath, bucket) + entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket) if entry == nil || err == filer_pb.ErrNotFound { writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL) return @@ -164,8 +164,8 @@ func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request bucket, _ := getBucketAndObject(r) - entry, err := s3a.get(s3a.option.BucketsPath, bucket) if entry == nil || err != nil { + entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket) writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL) return }