ipcenter/main.go

32 lines
445 B
Go
Raw Permalink Normal View History

2018-12-16 18:58:52 +00:00
package main
import (
"log"
)
var passwd = "youmi"
// ErrorLog 错误打日志
func ErrorLog(err error) bool {
if err != nil {
log.Println(err)
return true
}
return false
}
// ErrorPanic 错误打日志
func ErrorPanic(err error) {
if err != nil {
panic(err)
}
}
func main() {
log.SetFlags(log.Llongfile | log.LstdFlags)
swi := NewSwitch()
swi.Run("0.0.0.0:3333", `10\.10\..+`)
// swi.Run("0.0.0.0:3333", ``)
log.Fatal()
}