MCPcopy Create free account
hub / github.com/docker/docker-language-server / readFileLines

Function readFileLines

releaser/main.go:237–251  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

235}
236
237func readFileLines(filename string) ([]string, error) {
238 file, err := os.Open(filename)
239 if err != nil {
240 return nil, err
241 }
242 defer file.Close()
243
244 var lines []string
245 scanner := bufio.NewScanner(file)
246 for scanner.Scan() {
247 lines = append(lines, scanner.Text())
248 }
249
250 return lines, scanner.Err()
251}

Callers 4

TestUpdateChangelogFunction · 0.85
TestGenerateReleaseNotesFunction · 0.85
updateChangelogFunction · 0.85
generateReleaseNotesFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by 2

TestUpdateChangelogFunction · 0.68
TestGenerateReleaseNotesFunction · 0.68