mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-29 23:30:37 +08:00
chore: make lint happy
This commit is contained in:
@@ -4,8 +4,9 @@ linters-settings:
|
||||
exclude-functions:
|
||||
- fmt:.*
|
||||
- io/ioutil:^Read.*
|
||||
- github.com/fumiama/WireGold/helper.(*Writer).(Write.*)
|
||||
- github.com/fumiama/WireGold/upper/services/tunnel.(*Tunnel).(Write|Read)
|
||||
- os:\(\*File\)\..*
|
||||
- github.com/fumiama/WireGold/helper:\(\*Writer\)\.Write.*
|
||||
- github.com/fumiama/WireGold/upper/services/tunnel:\(\*Tunnel\)\.(Write|Read)
|
||||
|
||||
goimports:
|
||||
local-prefixes: github.com/fumiama/WireGold
|
||||
|
||||
@@ -46,6 +46,8 @@ func TestTunnel(t *testing.T) {
|
||||
AllowedIPs: []string{"192.168.1.3/32"},
|
||||
PubicKey: peerpk.Public(),
|
||||
MTU: 4096,
|
||||
MTURandomRange: 1024,
|
||||
UseZstd: true,
|
||||
})
|
||||
p := link.NewMe(&link.MyConfig{
|
||||
MyIPwithMask: "192.168.1.3/32",
|
||||
@@ -61,6 +63,8 @@ func TestTunnel(t *testing.T) {
|
||||
AllowedIPs: []string{"192.168.1.2/32"},
|
||||
PubicKey: selfpk.Public(),
|
||||
MTU: 4096,
|
||||
MTURandomRange: 1024,
|
||||
UseZstd: true,
|
||||
})
|
||||
tunnme, err := Create(&m, "192.168.1.3")
|
||||
if err != nil {
|
||||
@@ -102,6 +106,8 @@ func TestTunnel(t *testing.T) {
|
||||
t.Log("read", n, "bytes")
|
||||
if string(sendb) != string(buf) {
|
||||
t.Fatal("error: recv 65535 bytes data")
|
||||
t.Log("expect", hex.EncodeToString(sendb))
|
||||
t.Log("got", hex.EncodeToString(buf))
|
||||
}
|
||||
|
||||
tunnme.Stop()
|
||||
|
||||
Reference in New Issue
Block a user