MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / randomInt

Function randomInt

internal/repository/cache/check.go:180–182  ·  view source on GitHub ↗

randomInt 生成 min 到 max 之间的随机整数,用于随机化 TTL

(min, max int)

Source from the content-addressed store, hash-verified

178
179// randomInt 生成 min 到 max 之间的随机整数,用于随机化 TTL
180func randomInt(min, max int) int {
181 return min + rand.Intn(max-min+1)
182}

Callers 3

SetCacheMethod · 0.85
SetCacheListMethod · 0.85
SetCountCacheMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected