From 183f09d13a79915af80110c857016f5789d4483f Mon Sep 17 00:00:00 2001 From: eveneast <166489430+eveneast@users.noreply.github.com> Date: Mon, 20 May 2024 21:52:22 +0800 Subject: [PATCH] Fix code comments function names (#2927) Signed-off-by: eveneast --- pkg/crd/key.go | 2 +- pkg/executor/fscache/poolcache.go | 4 ++-- pkg/fission-cli/cmd/function/create.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/crd/key.go b/pkg/crd/key.go index d8c9ff04c..777a17791 100644 --- a/pkg/crd/key.go +++ b/pkg/crd/key.go @@ -42,7 +42,7 @@ func (ck CacheKeyURG) String() string { return fmt.Sprintf("%v_%v_%v", ck.UID, ck.ResourceVersion, ck.Generation) } -// CacheKeyForUID create a key that uniquely identifies the +// CacheKeyUIDFromMeta create a key that uniquely identifies the // of the object. Since resourceVersion changes on every update and // UIDs are unique, we don't use resource version here func CacheKeyUIDFromMeta(metadata *metav1.ObjectMeta) types.UID { diff --git a/pkg/executor/fscache/poolcache.go b/pkg/executor/fscache/poolcache.go index 984591bd5..59244cfb6 100644 --- a/pkg/executor/fscache/poolcache.go +++ b/pkg/executor/fscache/poolcache.go @@ -355,7 +355,7 @@ func (c *PoolCache) MarkFuncDeleted(function crd.CacheKeyURG) { } } -// GetValue returns a function service with status in Active else return error +// GetSvcValue returns a function service with status in Active else return error func (c *PoolCache) GetSvcValue(ctx context.Context, function crd.CacheKeyURG, requestsPerPod int, concurrency int) (*FuncSvc, error) { respChannel := make(chan *response) c.requestChannel <- &request{ @@ -390,7 +390,7 @@ func (c *PoolCache) ListAvailableValue() []*FuncSvc { return resp.allValues } -// SetValue marks the value at key [function][address] as active(begin used) +// SetSvcValue marks the value at key [function][address] as active(begin used) func (c *PoolCache) SetSvcValue(ctx context.Context, function crd.CacheKeyURG, address string, value *FuncSvc, cpuLimit resource.Quantity, requestsPerPod, svcsRetain int) { respChannel := make(chan *response) c.requestChannel <- &request{ diff --git a/pkg/fission-cli/cmd/function/create.go b/pkg/fission-cli/cmd/function/create.go index 356eddf3c..fc488d1dd 100644 --- a/pkg/fission-cli/cmd/function/create.go +++ b/pkg/fission-cli/cmd/function/create.go @@ -334,7 +334,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error { return nil } -// generatePackgeName => will return package name by appending id in function name and will make sure that package name will never be more than length of 63 characters. +// generatePackageName => will return package name by appending id in function name and will make sure that package name will never be more than length of 63 characters. func generatePackageName(fnName string, id string) string { var ( lenFnName int = len(fnName)