MCPcopy Create free account
hub / github.com/goinaction/code / store

Function store

chapter10/listing01/listing01.go:75–83  ·  view source on GitHub ↗

store knows how to store bulks of data into Pillar.

(p *Pillar, data []Data)

Source from the content-addressed store, hash-verified

73
74// store knows how to store bulks of data into Pillar.
75func store(p *Pillar, data []Data) (int, error) {
76 for i, d := range data {
77 if err := p.Store(d); err != nil {
78 return i, err
79 }
80 }
81
82 return len(data), nil
83}
84
85// Copy knows how to pull and store data from the System.
86func Copy(sys *System, batch int) error {

Callers 1

CopyFunction · 0.70

Calls 1

StoreMethod · 0.65

Tested by

no test coverage detected