our other readdir function, only opens and reads
(dirname string)
| 39 | |
| 40 | // our other readdir function, only opens and reads |
| 41 | func readdir(dirname string) []os.FileInfo { |
| 42 | f, err := os.Open(dirname) |
| 43 | if err != nil { |
| 44 | return nil |
| 45 | } |
| 46 | fi, err := f.Readdir(-1) |
| 47 | f.Close() |
| 48 | if err != nil { |
| 49 | panic(err) |
| 50 | } |
| 51 | return fi |
| 52 | } |
| 53 | |
| 54 | // returns truncated 'data' and amount of bytes skipped (for cursor pos adjustment) |
| 55 | func filter_out_shebang(data []byte) ([]byte, int) { |
no outgoing calls
no test coverage detected