@@ -44,8 +44,10 @@ import (
44
44
type Store struct {
45
45
// AutoSaveIndex controls if the OCI store will automatically save the index
46
46
// file when needed.
47
- // - If AutoSaveIndex is set to true, the OCI store will automatically save the
48
- // changes to `index.json` on Tag() and Delete() calls, and when pushing a manifest.
47
+ // - If AutoSaveIndex is set to true, the OCI store will automatically save
48
+ // the changes to `index.json` when
49
+ // 1. pushing a manifest
50
+ // 2. calling Tag() or Delete()
49
51
// - If AutoSaveIndex is set to false, it's the caller's responsibility
50
52
// to manually call SaveIndex() when needed.
51
53
// - Default value: true.
@@ -61,7 +63,7 @@ type Store struct {
61
63
// has the exclusive access to Store if a delete operation is underway. Operations
62
64
// such as Fetch, Push use sync.RLock(), while Delete uses sync.Lock().
63
65
sync sync.RWMutex
64
- // indexLock ensures that only one process is writing to the index.
66
+ // indexLock ensures that only one go-routine is writing to the index.
65
67
indexLock sync.Mutex
66
68
}
67
69
@@ -141,7 +143,7 @@ func (s *Store) Exists(ctx context.Context, target ocispec.Descriptor) (bool, er
141
143
142
144
// Delete deletes the content matching the descriptor from the store. Delete may
143
145
// fail on certain systems (i.e. NTFS), if there is a process (i.e. an unclosed
144
- // Reader) using ` target` .
146
+ // Reader) using target.
145
147
func (s * Store ) Delete (ctx context.Context , target ocispec.Descriptor ) error {
146
148
s .sync .Lock ()
147
149
defer s .sync .Unlock ()
0 commit comments