diff --git a/server/gitea/cache.go b/server/gitea/cache.go index a18f646..9b68c02 100644 --- a/server/gitea/cache.go +++ b/server/gitea/cache.go @@ -26,7 +26,7 @@ const ( // TODO: move as option into cache interface fileCacheTimeout = 5 * time.Minute - // ownerExistanceCacheTimeout specifies the timeout for the existence of a repo/org + // ownerExistenceCacheTimeout specifies the timeout for the existence of a repo/org ownerExistenceCacheTimeout = 5 * time.Minute // fileCacheSizeLimit limits the maximum file size that will be cached, and is set to 1 MB by default. diff --git a/server/gitea/client.go b/server/gitea/client.go index 01a0728..3e44e6e 100644 --- a/server/gitea/client.go +++ b/server/gitea/client.go @@ -28,7 +28,7 @@ const ( branchTimestampCacheKeyPrefix = "branchTime" defaultBranchCacheKeyPrefix = "defaultBranch" rawContentCacheKeyPrefix = "rawContent" - ownerExistanceKeyPrefix = "ownerExist" + ownerExistenceKeyPrefix = "ownerExist" // pages server PagesCacheIndicatorHeader = "X-Pages-Cache" @@ -265,7 +265,7 @@ func (client *Client) GiteaGetRepoDefaultBranch(repoOwner, repoName string) (str } func (client *Client) GiteaCheckIfOwnerExists(owner string) (bool, error) { - cacheKey := fmt.Sprintf("%s/%s", ownerExistanceKeyPrefix, owner) + cacheKey := fmt.Sprintf("%s/%s", ownerExistenceKeyPrefix, owner) if exist, ok := client.responseCache.Get(cacheKey); ok && exist != nil { return exist.(bool), nil