From 059a0be78399cdb0648bd514c5b179819d84403d Mon Sep 17 00:00:00 2001 From: Antonio Jesus Navarro Perez Date: Thu, 23 Feb 2017 17:07:08 +0100 Subject: plumbing: improve documentation (Fix #242) --- plumbing/storer/reference.go | 6 +++--- plumbing/storer/shallow.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plumbing/storer') diff --git a/plumbing/storer/reference.go b/plumbing/storer/reference.go index 692fe88..b408778 100644 --- a/plumbing/storer/reference.go +++ b/plumbing/storer/reference.go @@ -13,7 +13,7 @@ const MaxResolveRecursion = 1024 // is exceeded var ErrMaxResolveRecursion = errors.New("max. recursion level reached") -// ReferenceStorer generic storage of references +// ReferenceStorer is a generic storage of references. type ReferenceStorer interface { SetReference(*plumbing.Reference) error Reference(plumbing.ReferenceName) (*plumbing.Reference, error) @@ -21,7 +21,7 @@ type ReferenceStorer interface { RemoveReference(plumbing.ReferenceName) error } -// ReferenceIter is a generic closable interface for iterating over references +// ReferenceIter is a generic closable interface for iterating over references. type ReferenceIter interface { Next() (*plumbing.Reference, error) ForEach(func(*plumbing.Reference) error) error @@ -82,7 +82,7 @@ func (iter *ReferenceSliceIter) Close() { iter.pos = len(iter.series) } -// ResolveReference resolve a SymbolicReference to a HashReference +// ResolveReference resolves a SymbolicReference to a HashReference. func ResolveReference(s ReferenceStorer, n plumbing.ReferenceName) (*plumbing.Reference, error) { r, err := s.Reference(n) if err != nil || r == nil { diff --git a/plumbing/storer/shallow.go b/plumbing/storer/shallow.go index f93060d..a38e751 100644 --- a/plumbing/storer/shallow.go +++ b/plumbing/storer/shallow.go @@ -2,8 +2,8 @@ package storer import "srcd.works/go-git.v4/plumbing" -// ShallowStorer storage of references to shallow commits by hash, meaning that -// these commits have missing parents because of a shallow fetch. +// ShallowStorer is a storage of references to shallow commits by hash, +// meaning that these commits have missing parents because of a shallow fetch. type ShallowStorer interface { SetShallow([]plumbing.Hash) error Shallow() ([]plumbing.Hash, error) -- cgit