MCPcopy Index your code
hub / github.com/coder/coder / read

Function read

cli/config/file.go:128–135  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

126}
127
128func read(path string) ([]byte, error) {
129 fi, err := open(path, os.O_RDONLY, 0)
130 if err != nil {
131 return nil, err
132 }
133 defer fi.Close()
134 return io.ReadAll(fi)
135}
136
137func DefaultDir() string {
138 configDir := configdir.LocalConfig("coderv2")

Callers 1

ReadMethod · 0.85

Calls 3

openFunction · 0.70
CloseMethod · 0.65
ReadAllMethod · 0.45

Tested by

no test coverage detected