MCPcopy Index your code
hub / github.com/256dpi/gcode / WriteFile

Function WriteFile

gcode.go:73–83  ·  view source on GitHub ↗

WriteFile will write the specified G-Code file to the passed writer.

(w io.Writer, f *File)

Source from the content-addressed store, hash-verified

71
72// WriteFile will write the specified G-Code file to the passed writer.
73func WriteFile(w io.Writer, f *File) error {
74 // generate lines
75 for _, l := range f.Lines {
76 _, err := io.WriteString(w, l.String())
77 if err != nil {
78 return err
79 }
80 }
81
82 return nil
83}

Callers 2

writeFileFunction · 0.92
TestWriteFileFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by 1

TestWriteFileFunction · 0.68