Matheus Sampaio Queiroga
37207e9678
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
19 lines
258 B
Go
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)
|
|
} |