First commit

This commit is contained in:
2023-01-27 01:48:03 +01:00
commit edb83afcdf
5 changed files with 166 additions and 0 deletions

18
util.go Normal file
View File

@@ -0,0 +1,18 @@
package main
import (
"fmt"
"os"
"time"
)
func checkError(err error) {
if err == nil {
return
}
fmt.Println("[!] ", err)
f, _ := os.OpenFile("error.log", os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
v, _ := time.Now().UTC().MarshalText()
f.WriteString(fmt.Sprintf("[%s] %s\n", string(v), err))
}