1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-04 23:40:26 +08:00

chore: make lint happy

This commit is contained in:
源文雨
2024-07-11 18:17:53 +09:00
parent 0edf4e92c3
commit 2ad307df60
3 changed files with 6 additions and 4 deletions

View File

@@ -1,9 +1,10 @@
linters-settings:
errcheck:
ignore: fmt:.*,io/ioutil:^Read.*
ignoretests: true
exclude-functions:
- github.com/fumiama/WireGold/helper.(*Writer).Write.*
- fmt:.*
- io/ioutil:^Read.*
- github.com/fumiama/WireGold/helper.(*Writer).(Write.*)
- github.com/fumiama/WireGold/upper/services/tunnel.(*Tunnel).(Write|Read)
goimports:

View File

@@ -41,8 +41,8 @@ func (m *Me) AddPeer(cfg *PeerConfig) (l *Link) {
allowtrans: cfg.AllowTrans,
usezstd: cfg.UseZstd,
me: m,
mtu: uint16(cfg.MTU),
mturandomrange: uint16(cfg.MTURandomRange),
mtu: cfg.MTU,
mturandomrange: cfg.MTURandomRange,
}
if !cfg.NoPipe {

View File

@@ -57,6 +57,7 @@ func (n *NIC) Close() error {
return n.ifce.Close()
}
// nolint: unparam
func execute(c string, args ...string) {
logrus.Printf("[lower] exec cmd: %v %v:", c, args)
cmd := exec.Command(c, args...)