Cleanup commets with feedback from @fw42

This commit is contained in:
Alexander Neumann 2015-05-02 17:01:31 +02:00
parent c9664e9eac
commit ba1125df10
3 changed files with 9 additions and 5 deletions

View file

@ -530,7 +530,8 @@ func (j archiveJob) Copy() pipe.Job {
}
// Snapshot creates a snapshot of the given paths. If parentID is set, this is
// used to compare the files with.
// used to compare the files to the ones archived at the time this snapshot was
// taken.
func (arch *Archiver) Snapshot(p *Progress, paths []string, parentID backend.ID) (*Snapshot, backend.ID, error) {
debug.Log("Archiver.Snapshot", "start for %v", paths)

View file

@ -13,7 +13,7 @@ import (
"github.com/restic/restic/server"
)
// Cache is used to handle the local cache.
// Cache is used to locally cache items from a server.
type Cache struct {
base string
}
@ -53,7 +53,9 @@ func (c *Cache) Has(t backend.Type, subtype string, id backend.ID) (bool, error)
return true, nil
}
// Store returns an io.WriteCloser that is used to save new information to.
// Store returns an io.WriteCloser that is used to save new information to the
// cache. The returned io.WriteCloser must be closed by the caller after all
// data has been written.
func (c *Cache) Store(t backend.Type, subtype string, id backend.ID) (io.WriteCloser, error) {
filename, err := c.filename(t, subtype, id)
if err != nil {
@ -76,7 +78,8 @@ func (c *Cache) Store(t backend.Type, subtype string, id backend.ID) (io.WriteCl
return file, nil
}
// Load returns information from the cache.
// Load returns information from the cache. The returned io.ReadCloser must be
// closed by the caller.
func (c *Cache) Load(t backend.Type, subtype string, id backend.ID) (io.ReadCloser, error) {
filename, err := c.filename(t, subtype, id)
if err != nil {

View file

@ -53,7 +53,7 @@ func (c Chunk) Reader(r io.ReaderAt) io.Reader {
return io.NewSectionReader(r, int64(c.Start), int64(c.Length))
}
// Chunker split content with Rabin Fingerprints.
// Chunker splits content with Rabin Fingerprints.
type Chunker struct {
pol Pol
polShift uint