| 1 | package sessionscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.16 fmt/" |
| 5 | "osscip-go gomod github.com/golang/go/src go1.16 os/" |
| 6 | "sortscip-go gomod github.com/golang/go/src go1.16 sort/" |
| 7 | "syncscip-go gomod github.com/golang/go/src go1.16 sync/" |
| 8 | "timescip-go gomod github.com/golang/go/src go1.16 time/" |
| 9 | |
| 10 | "github.com/evilsocket/islazy/logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/" |
| 11 | "github.com/evilsocket/islazy/tuiscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/tui`/" |
| 12 | ) |
| 13 | |
| 14 | type Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# struct { |
| 15 | Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag. string `json:"tag"` |
| 16 | Timescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Time. timescip-go gomod github.com/golang/go/src go1.16 time/.Timescip-go gomod github.com/golang/go/src go1.16 time/Time# `json:"time"` |
| 17 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Data. interface{} `json:"data"` |
| 18 | } |
| 19 | |
| 20 | type LogMessagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage# struct { |
| 21 | Levelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#Level. logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.Verbosityscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/Verbosity# |
| 22 | Messagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#Message. string |
| 23 | } |
| 24 | |
| 25 | func NewEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/NewEvent().(tag string, data interface{}) Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# { |
| 26 | return Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#{ |
| 27 | Tagscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Tag.: tag, |
| 28 | Timescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Time.: timescip-go gomod github.com/golang/go/src go1.16 time/.Nowscip-go gomod github.com/golang/go/src go1.16 time/Now().(), |
| 29 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Data.: data, |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func (e Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#) Labelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Label().() string { |
| 34 | m := e.Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Data..(LogMessagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#) |
| 35 | label := logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.LevelNamescip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/LevelName().(m.Levelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#Level.) |
| 36 | color := logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.LevelColorscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/LevelColor().(m.Levelscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#Level.) |
| 37 | return color + label + tuiscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/tui`/.RESETscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/tui`/RESET. |
| 38 | } |
| 39 | |
| 40 | type EventBusscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventBus# <-chan Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# |
| 41 | |
| 42 | type PrintCallbackscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintCallback# func(format string, args ...interface{}) |
| 43 | |
| 44 | type PrintWriterscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter# struct { |
| 45 | poolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#pool. *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool# |
| 46 | } |
| 47 | |
| 48 | func (w PrintWriterscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#) Writescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#Write().(p []byte) (n int, err error) { |
| 49 | w.poolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#pool..Printfscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Printf().("%s", string(p)) |
| 50 | return len(p), nil |
| 51 | } |
| 52 | |
| 53 | type EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool# struct { |
| 54 | *syncscip-go gomod github.com/golang/go/src go1.16 sync/.Mutexscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Mutex. |
| 55 | |
| 56 | debugscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#debug. bool |
| 57 | silentscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#silent. bool |
| 58 | eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events. []Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# |
| 59 | listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners. []chan Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# |
| 60 | printLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printLock. syncscip-go gomod github.com/golang/go/src go1.16 sync/.Mutexscip-go gomod github.com/golang/go/src go1.16 sync/Mutex# |
| 61 | printCbsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printCbs. []PrintCallbackscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintCallback# |
| 62 | Stdoutscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Stdout. PrintWriterscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter# |
| 63 | } |
| 64 | |
| 65 | func NewEventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/NewEventPool().(debug bool, silent bool) *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool# { |
| 66 | pool := &EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#{ |
| 67 | Mutexscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Mutex.: &syncscip-go gomod github.com/golang/go/src go1.16 sync/.Mutexscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#{}, |
| 68 | debugscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#debug.: debug, |
| 69 | silentscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#silent.: silent, |
| 70 | eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events.: make([]Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#, 0), |
| 71 | listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners.: make([]chan Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#, 0), |
| 72 | printCbsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printCbs.: make([]PrintCallbackscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintCallback#, 0), |
| 73 | } |
| 74 | |
| 75 | pool.Stdoutscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Stdout. = PrintWriterscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#{ |
| 76 | poolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintWriter#pool.: pool, |
| 77 | } |
| 78 | |
| 79 | return pool |
| 80 | } |
| 81 | |
| 82 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) OnPrintscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#OnPrint().(cb PrintCallbackscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/PrintCallback#) { |
| 83 | p.printLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printLock..Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 84 | defer p.printLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printLock..Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 85 | p.printCbsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printCbs. = append(p.printCbsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printCbs., cb) |
| 86 | } |
| 87 | |
| 88 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Listenscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Listen().() EventBusscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventBus# { |
| 89 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 90 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 91 | l := make(chan Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#) |
| 92 | |
| 93 | // make sure, without blocking, the new listener |
| 94 | // will receive all the queued events |
| 95 | go func() { |
| 96 | for i := len(p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events.) - 1; i >= 0; i-- { |
| 97 | defer func() { |
| 98 | recover() |
| 99 | }() |
| 100 | l <- p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events.[i] |
| 101 | } |
| 102 | }() |
| 103 | |
| 104 | p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners. = append(p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners., l) |
| 105 | return l |
| 106 | } |
| 107 | |
| 108 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Unlistenscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Unlisten().(listener EventBusscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventBus#) { |
| 109 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 110 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 111 | |
| 112 | for i, l := range p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners. { |
| 113 | if l == listener { |
| 114 | close(l) |
| 115 | p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners. = append(p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners.[:i], p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners.[i+1:]...) |
| 116 | return |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) SetSilentscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#SetSilent().(s bool) { |
| 122 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 123 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 124 | p.silentscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#silent. = s |
| 125 | } |
| 126 | |
| 127 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) SetDebugscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#SetDebug().(d bool) { |
| 128 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 129 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 130 | p.debugscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#debug. = d |
| 131 | } |
| 132 | |
| 133 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Addscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Add().(tag string, data interface{}) { |
| 134 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 135 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 136 | |
| 137 | e := NewEventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/NewEvent().(tag, data) |
| 138 | p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events. = append([]Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#{e}, p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events....) |
| 139 | |
| 140 | // broadcast the event to every listener |
| 141 | for _, l := range p.listenersscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#listeners. { |
| 142 | // do not block! |
| 143 | go func(ch chan Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#) { |
| 144 | // channel might be closed |
| 145 | defer func() { |
| 146 | if recover() != nil { |
| 147 | |
| 148 | } |
| 149 | }() |
| 150 | ch <- e |
| 151 | }(l) |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Printfscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Printf().(format string, a ...interface{}) { |
| 156 | p.printLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printLock..Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 157 | defer p.printLockscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printLock..Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 158 | |
| 159 | for _, cb := range p.printCbsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#printCbs. { |
| 160 | cb(format, a...) |
| 161 | } |
| 162 | fmtscip-go gomod github.com/golang/go/src go1.16 fmt/.Printfscip-go gomod github.com/golang/go/src go1.16 fmt/Printf().(format, a...) |
| 163 | } |
| 164 | |
| 165 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Logscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Log().(level logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.Verbosityscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/Verbosity#, format string, args ...interface{}) { |
| 166 | if level == logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.DEBUGscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/DEBUG. && !p.debugscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#debug. { |
| 167 | return |
| 168 | } else if level < logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.ERRORscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/ERROR. && p.silentscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#silent. { |
| 169 | return |
| 170 | } |
| 171 | |
| 172 | message := fmtscip-go gomod github.com/golang/go/src go1.16 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.16 fmt/Sprintf().(format, args...) |
| 173 | |
| 174 | p.Addscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Add().("sys.log", LogMessagescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/LogMessage#{ |
| 175 | level, |
| 176 | message, |
| 177 | }) |
| 178 | |
| 179 | if level == logscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/.FATALscip-go gomod github.com/evilsocket/islazy v1.11.0 `github.com/evilsocket/islazy/log`/FATAL. { |
| 180 | fmtscip-go gomod github.com/golang/go/src go1.16 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.16 fmt/Fprintf().(osscip-go gomod github.com/golang/go/src go1.16 os/.Stderrscip-go gomod github.com/golang/go/src go1.16 os/Stderr., "%s\n", message) |
| 181 | osscip-go gomod github.com/golang/go/src go1.16 os/.Exitscip-go gomod github.com/golang/go/src go1.16 os/Exit().(1) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Clearscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Clear().() { |
| 186 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 187 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 188 | p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events. = make([]Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#, 0) |
| 189 | } |
| 190 | |
| 191 | func (p *EventPoolscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#) Sortedscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#Sorted().() []Eventscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event# { |
| 192 | p.Lockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Lock().() |
| 193 | defer p.Unlockscip-go gomod github.com/golang/go/src go1.16 sync/Mutex#Unlock().() |
| 194 | |
| 195 | sortscip-go gomod github.com/golang/go/src go1.16 sort/.Slicescip-go gomod github.com/golang/go/src go1.16 sort/Slice().(p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events., func(i, j int) bool { |
| 196 | return p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events.[i].Timescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Time..Beforescip-go gomod github.com/golang/go/src go1.16 time/Time#Before().(p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events.[j].Timescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/Event#Time.) |
| 197 | }) |
| 198 | |
| 199 | return p.eventsscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/session`/EventPool#events. |
| 200 | } |