MCPcopy Index your code
hub / github.com/go-python/gopy / OpenFile

Function OpenFile

_examples/osfile/osfile.go:16–23  ·  view source on GitHub ↗

note: the real test is to access os.File, io.Writer etc directly these funcs are just dummies to have something here to compile..

(fname string)

Source from the content-addressed store, hash-verified

14// these funcs are just dummies to have something here to compile..
15
16func OpenFile(fname string) *os.File {
17 f, err := os.Create(fname)
18 if err != nil {
19 log.Println(err)
20 return nil
21 }
22 return f
23}
24
25func WriteToFile(w io.Writer, str string) {
26 _, err := w.Write([]byte(str))

Callers

nothing calls this directly

Calls 1

PrintlnMethod · 0.80

Tested by

no test coverage detected