github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/pkg/tarsum/builder_context.go (about) 1 package tarsum 2 3 // This interface extends TarSum by adding the Remove method. In general 4 // there was concern about adding this method to TarSum itself so instead 5 // it is being added just to "BuilderContext" which will then only be used 6 // during the .dockerignore file processing - see builder/evaluator.go 7 type BuilderContext interface { 8 TarSum 9 Remove(string) 10 } 11 12 func (bc *tarSum) Remove(filename string) { 13 for i, fis := range bc.sums { 14 if fis.Name() == filename { 15 bc.sums = append(bc.sums[:i], bc.sums[i+1:]...) 16 // Note, we don't just return because there could be 17 // more than one with this name 18 } 19 } 20 }