MCPcopy Index your code
hub / github.com/goinaction/code / pull

Function pull

chapter10/listing01/listing01.go:64–72  ·  view source on GitHub ↗

============================================================================= pull knows how to pull bulks of data from Xenia.

(x *Xenia, data []Data)

Source from the content-addressed store, hash-verified

62
63// pull knows how to pull bulks of data from Xenia.
64func pull(x *Xenia, data []Data) (int, error) {
65 for i := range data {
66 if err := x.Pull(&data[i]); err != nil {
67 return i, err
68 }
69 }
70
71 return len(data), nil
72}
73
74// store knows how to store bulks of data into Pillar.
75func store(p *Pillar, data []Data) (int, error) {

Callers 1

CopyFunction · 0.70

Calls 1

PullMethod · 0.65

Tested by

no test coverage detected