diff --git a/app/router/rules/router_test.go b/app/router/rules/router_test.go index f743314e9..9503d4899 100644 --- a/app/router/rules/router_test.go +++ b/app/router/rules/router_test.go @@ -14,7 +14,7 @@ func TestSimpleRouter(t *testing.T) { config := &RouterRuleConfig{ Rules: []*Rule{ - &Rule{ + { Tag: "test", Condition: NewNetworkMatcher(v2net.Network("tcp").AsList()), }, diff --git a/common/protocol/user.go b/common/protocol/user.go index e2939ab9d..136e0b9aa 100644 --- a/common/protocol/user.go +++ b/common/protocol/user.go @@ -25,7 +25,7 @@ func NewUser(id *ID, level UserLevel, alterIdCount uint16) *User { if alterIdCount > 0 { u.AlterIDs = make([]*ID, alterIdCount) prevId := id.UUID() - for idx, _ := range u.AlterIDs { + for idx := range u.AlterIDs { newid := prevId.Next() // TODO: check duplicate u.AlterIDs[idx] = NewID(newid) diff --git a/shell/point/inbound_detour_dynamic.go b/shell/point/inbound_detour_dynamic.go index e3282d1db..7d402d2c1 100644 --- a/shell/point/inbound_detour_dynamic.go +++ b/shell/point/inbound_detour_dynamic.go @@ -31,7 +31,7 @@ func NewInboundDetourHandlerDynamic(space app.Space, config *InboundDetourConfig } ichCount := config.Allocation.Concurrency ichArray := make([]proxy.InboundHandler, ichCount*2) - for idx, _ := range ichArray { + for idx := range ichArray { ich, err := proxyrepo.CreateInboundHandler(config.Protocol, space, config.Settings) if err != nil { log.Error("Point: Failed to create inbound connection handler: ", err)