diff options
author | Vladimir Shushlin <v.shushlin@gmail.com> | 2021-12-06 16:32:32 +0300 |
---|---|---|
committer | Vladimir Shushlin <v.shushlin@gmail.com> | 2021-12-06 16:32:32 +0300 |
commit | de1ed60a4ca16ee397c2efc343cc1f765952db07 (patch) | |
tree | 0da9e983b64456a66a6a11b7d72c429b48991c88 | |
parent | d228c13c76d11091f8514e40940dc7df1b633e5a (diff) |
refactor: move keyFromPath our of zipVfs object
-rw-r--r-- | internal/vfs/zip/vfs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/vfs/zip/vfs.go b/internal/vfs/zip/vfs.go index a9825190..d2db1606 100644 --- a/internal/vfs/zip/vfs.go +++ b/internal/vfs/zip/vfs.go @@ -144,7 +144,7 @@ func (zfs *zipVFS) resetCache() { }) } -func (zfs *zipVFS) keyFromPath(path string) (string, error) { +func keyFromPath(path string) (string, error) { // We assume that our URL is https://.../artifacts.zip?content-sign=aaa // our caching key is `https://.../artifacts.zip` // TODO: replace caching key with file_sha256 @@ -168,7 +168,7 @@ func (zfs *zipVFS) keyFromPath(path string) (string, error) { func (zfs *zipVFS) Root(ctx context.Context, path string, cacheKey string) (vfs.Root, error) { // TODO: update acceptance tests mocked response to return a cacheKey if cacheKey == "" { - k, err := zfs.keyFromPath(path) + k, err := keyFromPath(path) if err != nil { return nil, err } |