Log doOutput to /tmp/gemini-output.log
This commit is contained in:
parent
fbc5ebe4ce
commit
249c2a97b8
14
doOutput.go
14
doOutput.go
|
@ -1,4 +1,18 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func doOutput(s string) {
|
||||
f, err := os.OpenFile("/tmp/gemini-output.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
defer f.Close()
|
||||
if _, err := f.WriteString(s + "\n"); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue