MCPcopy
hub / github.com/etcd-io/bbolt / trunc

Function trunc

db_test.go:2224–2229  ·  view source on GitHub ↗
(b []byte, length int)

Source from the content-addressed store, hash-verified

2222}
2223
2224func trunc(b []byte, length int) []byte {
2225 if length < len(b) {
2226 return b[:length]
2227 }
2228 return b
2229}
2230
2231func fileSize(path string) int64 {
2232 fi, err := os.Stat(path)

Callers 2

TestBucket_Delete_QuickFunction · 0.85
simulateGetHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected