MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / V1TarReader

Method V1TarReader

src/cmd/linuxkit/pkglib/build_test.go:492–500  ·  view source on GitHub ↗
(overrideName string)

Source from the content-addressed store, hash-verified

490 return nil, errors.New("unsupported")
491}
492func (c cacheMockerSource) V1TarReader(overrideName string) (io.ReadCloser, error) {
493 _, found := c.c.images[c.ref.String()]
494 if !found {
495 return nil, fmt.Errorf("no image found with ref: %s", c.ref.String())
496 }
497 b := make([]byte, 256)
498 _, _ = rand.Read(b)
499 return io.NopCloser(bytes.NewReader(b)), nil
500}
501func (c cacheMockerSource) OCITarReader(overrideName string) (io.ReadCloser, error) {
502 _, found := c.c.images[c.ref.String()]
503 if !found {

Callers

nothing calls this directly

Calls 2

StringMethod · 0.65
ReadMethod · 0.45

Tested by

no test coverage detected