aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/size.go
blob: da59e12adecb90e6aff03a1fe11370e7dde95f12 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package fetch

import objectid "codeberg.org/lindenii/furgit/object/id"

// Size returns the object content size at id.
//
// Labels: Life-Parent.
func (r *Fetcher) Size(id objectid.ObjectID) (int64, error) {
	size, err := r.store.ReadSize(id)
	if err != nil {
		return 0, wrapObjectReadError(id, err)
	}

	return size, nil
}