mirror of
https://github.com/40t/go-sniffer.git
synced 2025-08-07 11:09:00 +08:00
27 lines
277 B
Go
27 lines
277 B
Go
package core
|
|
|
|
type Core struct{
|
|
Version string
|
|
}
|
|
|
|
var cxt Core
|
|
|
|
func New() Core {
|
|
|
|
cxt.Version = "0.1"
|
|
|
|
return cxt
|
|
}
|
|
|
|
func (c *Core) Run() {
|
|
|
|
//new plugin
|
|
plug := NewPlug()
|
|
|
|
//parse commend
|
|
cmd := NewCmd(plug)
|
|
cmd.Run()
|
|
|
|
//dispatch
|
|
NewDispatch(plug, cmd).Capture()
|
|
} |