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 "io/ioutil" |
| 9 ) |
| 10 |
| 11 // ReadWalker implements Walker. It reads the contents of each found file. |
| 12 type ReadWalker struct { |
| 13 BaseWalker |
| 14 } |
| 15 |
| 16 func (r *ReadWalker) SmallFile(filename string, alldata []byte) { |
| 17 r.BaseWalker.SmallFile(filename, alldata) |
| 18 } |
| 19 |
| 20 func (r *ReadWalker) LargeFile(filename string) { |
| 21 r.BaseWalker.LargeFile(filename) |
| 22 _, err := ioutil.ReadFile(filename) |
| 23 if err != nil { |
| 24 r.Error(filename, err) |
| 25 } |
| 26 } |
OLD | NEW |