This repository has been archived on 2024-07-06. You can view files and clone it, but cannot push or open issues or pull requests.
go-playit/logfile/log.go
Matheus Sampaio Queiroga 37207e9678
Stash code
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2024-06-01 16:03:52 -03:00

19 lines
258 B
Go

package logfile
import (
"encoding/json"
"os"
)
var DebugFile = func() *os.File {
file, err := os.Create("./debug.log")
if err != nil {
panic(err)
}
return file
}()
func JSONString(data any) string {
d, _ := json.Marshal(data)
return string(d)
}