MCPcopy
hub / github.com/harness/harness / scan

Method scan

app/gitspace/logutil/scanner.go:34–48  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

32}
33
34func (r *scanner) scan(input string) ([]string, error) {
35 r.reader.Reset(input)
36 scanner := bufio.NewScanner(r.reader)
37 var lines []string
38
39 for scanner.Scan() {
40 lines = append(lines, scanner.Text())
41 }
42
43 if err := scanner.Err(); err != nil {
44 return nil, fmt.Errorf("error reading string %s: %w", input, err)
45 }
46
47 return lines, nil
48}

Callers 1

WriteMethod · 0.45

Calls 4

ScanMethod · 0.95
TextMethod · 0.95
ErrMethod · 0.95
ErrorfMethod · 0.45

Tested by

no test coverage detected