Skip to content

Commit 1ce88ad

Browse files
author
Aaron Schlesinger
committed
doc(pkg/gitreceive/storage/object.go): provide godoc for the ObjectExists call
1 parent c7f11bd commit 1ce88ad

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/gitreceive/storage/object.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ const (
1212
octetStream = "application/octet-stream"
1313
)
1414

15+
// ObjectExists determines whether the object in ${bucketName}/${objKey} exists, as reported by statter. Returns the following:
16+
//
17+
// - false, nil if statter succeeded and reported the object doesn't exist
18+
// - false, err with the appropriate error if the statter failed
19+
// - true, nil if the statter succeeded and reported the object exists
1520
func ObjectExists(statter ObjectStatter, bucketName, objKey string) (bool, error) {
1621
objInfo, err := statter.StatObject(bucketName, objKey)
1722
if err != nil {

0 commit comments

Comments
 (0)