MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / getScanner

Function getScanner

finder/entity.go:43–55  ·  view source on GitHub ↗
(fname string)

Source from the content-addressed store, hash-verified

41var glog = logrus.WithField("pkg", "namefinder")
42
43func getScanner(fname string) (*os.File, *bufio.Scanner) {
44 f, err := os.Open(fname)
45 if err != nil {
46 glog.WithError(err).Fatal("Unable to open file")
47 }
48
49 r, err := gzip.NewReader(f)
50 if err != nil {
51 glog.WithError(err).Fatal("Unable to open file")
52 }
53
54 return f, bufio.NewScanner(r)
55}
56
57type SyncWriter struct {
58 sync.RWMutex

Callers 2

grepFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected