MCPcopy Create free account
hub / github.com/Shopify/go-lua / write

Function write

io.go:92–105  ·  view source on GitHub ↗
(l *State, f *os.File, argIndex int)

Source from the content-addressed store, hash-verified

90}
91
92func write(l *State, f *os.File, argIndex int) int {
93 var err error
94 for argCount := l.Top(); argIndex < argCount && err == nil; argIndex++ {
95 if n, ok := l.ToNumber(argIndex); ok {
96 _, err = f.WriteString(numberToString(n))
97 } else {
98 _, err = f.WriteString(CheckString(l, argIndex))
99 }
100 }
101 if err == nil {
102 return 1
103 }
104 return FileResult(l, err, "")
105}
106
107func readNumber(l *State, f *os.File) (err error) {
108 var n float64

Callers 1

io.goFile · 0.85

Calls 5

numberToStringFunction · 0.85
CheckStringFunction · 0.85
FileResultFunction · 0.85
TopMethod · 0.80
ToNumberMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…