(p []byte)
| 522 | } |
| 523 | |
| 524 | func (nw *namespacedWriter) Write(p []byte) (int, error) { |
| 525 | // if no writer, first copy and unshare before performing write |
| 526 | if nw.w == nil { |
| 527 | if len(p) == 0 { |
| 528 | return 0, nil |
| 529 | } |
| 530 | |
| 531 | if err := nw.createAndCopy(nw.ctx, nw.desc); err != nil { |
| 532 | return 0, err |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | return nw.w.Write(p) |
| 537 | } |
| 538 | |
| 539 | func (nw *namespacedWriter) Digest() digest.Digest { |
| 540 | if nw.w != nil { |
nothing calls this directly
no test coverage detected