diff --git a/.golangci.yml b/.golangci.yml index f32f75c..d596be5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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: diff --git a/gold/link/peer.go b/gold/link/peer.go index 991e912..631c047 100644 --- a/gold/link/peer.go +++ b/gold/link/peer.go @@ -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 { diff --git a/lower/nic.go b/lower/nic.go index c688bf2..e6495a9 100644 --- a/lower/nic.go +++ b/lower/nic.go @@ -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...)