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

Function writeFile

cmd/gcode/helpers.go:28–43  ·  view source on GitHub ↗
(path string, f *gcode.File)

Source from the content-addressed store, hash-verified

26}
27
28func writeFile(path string, f *gcode.File) {
29 // create g-code file
30 file, err := os.Create(path)
31 if err != nil {
32 panic(err)
33 }
34
35 // make sure file gets closed
36 defer file.Close()
37
38 // parse file
39 err = gcode.WriteFile(file, f)
40 if err != nil {
41 panic(err)
42 }
43}
44
45func writeFileString(path string, s string) {
46 // create g-code file

Callers 2

stripFunction · 0.85
offsetFunction · 0.85

Calls 1

WriteFileFunction · 0.92

Tested by

no test coverage detected