MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / prefix

Method prefix

internal/caches/list_memory.go:425–437  ·  view source on GitHub ↗
(hash string)

Source from the content-addressed store, hash-verified

423}
424
425func (this *MemoryList) prefix(hash string) string {
426 var prefix string
427 if len(hash) > 3 {
428 prefix = hash[:3]
429 } else {
430 prefix = hash
431 }
432 _, ok := this.itemMaps[prefix]
433 if !ok {
434 prefix = "000"
435 }
436 return prefix
437}

Callers 4

AddMethod · 0.95
ExistMethod · 0.95
RemoveMethod · 0.95
IncreaseHitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected