1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00

chore: make lint happy

This commit is contained in:
源文雨
2024-07-11 18:14:24 +09:00
parent c0f31a70c8
commit 0edf4e92c3
5 changed files with 90 additions and 10 deletions

View File

@@ -49,20 +49,19 @@ func NewWireGold(c *config.Config) (wg WG, err error) {
}
func (wg *WG) Start(srcport, destport uint16) {
wg.init(srcport, destport)
go wg.me.ListenFromNIC()
go wg.Run(srcport, destport)
}
func (wg *WG) Run(srcport, destport uint16) {
wg.init(srcport, destport)
_, err := wg.me.ListenFromNIC()
_, err := wg.me.ListenNIC()
if err != nil {
logrus.Panicln(err)
}
}
func (wg *WG) Stop() {
_ = wg.me.Close()
_ = wg.me.CloseNIC()
}
func (wg *WG) init(srcport, dstport uint16) {