github.com/mgoltzsche/ctnr@v0.7.1-alpha/pkg/fs/source/sourcewhiteout.go (about) 1 package source 2 3 import ( 4 "github.com/mgoltzsche/ctnr/pkg/fs" 5 ) 6 7 type sourceWhiteout string 8 9 func NewSourceWhiteout() fs.Source { 10 return sourceWhiteout(fs.TypeWhiteout) 11 } 12 13 func (s sourceWhiteout) Attrs() fs.NodeInfo { 14 return fs.NodeInfo{NodeType: fs.TypeWhiteout} 15 } 16 17 func (s sourceWhiteout) DeriveAttrs() (a fs.DerivedAttrs, err error) { 18 return fs.DerivedAttrs{}, nil 19 } 20 21 func (s sourceWhiteout) Write(dest, name string, w fs.Writer, written map[fs.Source]string) error { 22 return w.Remove(dest) 23 }