MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / metaIncrement

Function metaIncrement

pkg/filestore/blockstore.go:283–294  ·  view source on GitHub ↗
(file *WaveFile, key string, amount int)

Source from the content-addressed store, hash-verified

281}
282
283func metaIncrement(file *WaveFile, key string, amount int) int {
284 if file.Meta == nil {
285 file.Meta = make(wshrpc.FileMeta)
286 }
287 val, ok := file.Meta[key].(int)
288 if !ok {
289 val = 0
290 }
291 newVal := val + amount
292 file.Meta[key] = newVal
293 return newVal
294}
295
296func (s *FileStore) compactIJson(ctx context.Context, entry *CacheEntry) error {
297 // we don't need to lock the entry because we have the lock on the filestore

Callers 1

AppendIJsonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected