MCPcopy Create free account
hub / github.com/nsf/gocode / readdir

Function readdir

utils.go:41–52  ·  view source on GitHub ↗

our other readdir function, only opens and reads

(dirname string)

Source from the content-addressed store, hash-verified

39
40// our other readdir function, only opens and reads
41func 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)
55func filter_out_shebang(data []byte) ([]byte, int) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected