(filename string)
| 67 | } |
| 68 | |
| 69 | func readContentsFromFile(filename string) (contents string, err error) { |
| 70 | content, err := ioutil.ReadFile(filename) |
| 71 | if err != nil { |
| 72 | if strings.HasSuffix(err.Error(), " is a directory") { |
| 73 | err = nil |
| 74 | } |
| 75 | return |
| 76 | } |
| 77 | |
| 78 | contents = strings.Replace(string(content), "\r\n", "\n", -1) |
| 79 | contents = strings.TrimSuffix(contents, "\n") |
| 80 | return |
| 81 | } |
no test coverage detected
searching dependent graphs…