| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 
|  | 2 // Use of this source code is governed under the Apache License, Version 2.0 | 
|  | 3 // that can be found in the LICENSE file. | 
|  | 4 | 
|  | 5 package main | 
|  | 6 | 
|  | 7 import ( | 
|  | 8         "fmt" | 
|  | 9         "io" | 
|  | 10 ) | 
|  | 11 | 
|  | 12 // PrintFileProcessor implements FileProcessor. It prints the path of each found
     file. | 
|  | 13 type PrintFileProcessor struct { | 
|  | 14         BaseFileProcessor | 
|  | 15         obuf io.Writer | 
|  | 16 } | 
|  | 17 | 
|  | 18 func (p *PrintFileProcessor) Dir(path string) { | 
|  | 19         fmt.Fprintln(p.obuf, "  dir", path) | 
|  | 20         p.BaseFileProcessor.Dir(path) | 
|  | 21 } | 
|  | 22 | 
|  | 23 func (p *PrintFileProcessor) SmallFile(path string, r io.ReadCloser) { | 
|  | 24         fmt.Fprintln(p.obuf, "small", path) | 
|  | 25         p.BaseFileProcessor.SmallFile(path, r) | 
|  | 26 } | 
|  | 27 | 
|  | 28 func (p *PrintFileProcessor) LargeFile(path string, r io.ReadCloser) { | 
|  | 29         fmt.Fprintln(p.obuf, "large", path) | 
|  | 30         p.BaseFileProcessor.LargeFile(path, r) | 
|  | 31 } | 
| OLD | NEW | 
|---|