Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-31 12:05:20 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-07 10:50:28 +0300
commit71ef0d72052da72d91e6087602475c5e055fe135 (patch)
tree7be76dc425e76937a559d38de76d4a71b832314e /internal/cache
parent506a21d8dc42b3187ba75d7e007839d07cc97b85 (diff)
safe: Rename `CreateFileWriter()` to be more idiomatic
In Gitaly, constructors for structs are typically called `NewStruct()`. Rename `CreateFileWriter()` to `NewFileWriter()` to better match our coding style.
Diffstat (limited to 'internal/cache')
-rw-r--r--internal/cache/diskcache.go2
-rw-r--r--internal/cache/keyer.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/cache/diskcache.go b/internal/cache/diskcache.go
index 98f839fbc..3fb5bf4bb 100644
--- a/internal/cache/diskcache.go
+++ b/internal/cache/diskcache.go
@@ -289,7 +289,7 @@ func (c *DiskCache) PutStream(ctx context.Context, repo *gitalypb.Repository, re
return err
}
- sf, err := safe.CreateFileWriter(reqPath)
+ sf, err := safe.NewFileWriter(reqPath)
if err != nil {
return err
}
diff --git a/internal/cache/keyer.go b/internal/cache/keyer.go
index a46fa22a7..dad5df90d 100644
--- a/internal/cache/keyer.go
+++ b/internal/cache/keyer.go
@@ -66,7 +66,7 @@ func (keyer leaseKeyer) updateLatest(ctx context.Context, repo *gitalypb.Reposit
return "", err
}
- latest, err := safe.CreateFileWriter(lPath)
+ latest, err := safe.NewFileWriter(lPath)
if err != nil {
return "", err
}