diff --git a/app/commander/errors.generated.go b/app/commander/errors.generated.go index fd7b91797..70edc7084 100644 --- a/app/commander/errors.generated.go +++ b/app/commander/errors.generated.go @@ -2,4 +2,6 @@ package commander import "v2ray.com/core/common/errors" -func newError(values ...interface{}) *errors.Error { return errors.New(values...).Path("App", "Commander") } +func newError(values ...interface{}) *errors.Error { + return errors.New(values...).Path("App", "Commander") +} diff --git a/app/commander/outbound.go b/app/commander/outbound.go index 1338c7451..018cef242 100644 --- a/app/commander/outbound.go +++ b/app/commander/outbound.go @@ -62,4 +62,4 @@ func (co *CommanderOutbound) Start() error { return nil } -func (co *CommanderOutbound) Close() {} \ No newline at end of file +func (co *CommanderOutbound) Close() {} diff --git a/app/proxyman/command/errors.generated.go b/app/proxyman/command/errors.generated.go index 3cbe9949a..7c196cf5d 100644 --- a/app/proxyman/command/errors.generated.go +++ b/app/proxyman/command/errors.generated.go @@ -2,4 +2,6 @@ package command import "v2ray.com/core/common/errors" -func newError(values ...interface{}) *errors.Error { return errors.New(values...).Path("App", "Proxyman", "Command") } +func newError(values ...interface{}) *errors.Error { + return errors.New(values...).Path("App", "Proxyman", "Command") +} diff --git a/proxy/proxy.go b/proxy/proxy.go index 1f7de5b56..7174c2453 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -53,4 +53,4 @@ type GetInbound interface { type GetOutbound interface { GetOutbound() Outbound -} \ No newline at end of file +} diff --git a/proxy/vmess/vmess.go b/proxy/vmess/vmess.go index 0fbefc43c..9c805fa23 100644 --- a/proxy/vmess/vmess.go +++ b/proxy/vmess/vmess.go @@ -22,9 +22,9 @@ const ( ) type idEntry struct { - id *protocol.ID - userIdx int - lastSec protocol.Timestamp + id *protocol.ID + userIdx int + lastSec protocol.Timestamp } type TimedUserValidator struct { @@ -114,17 +114,17 @@ func (v *TimedUserValidator) Add(user *protocol.User) error { nowSec := time.Now().Unix() entry := &idEntry{ - id: account.ID, - userIdx: idx, - lastSec: protocol.Timestamp(nowSec - cacheDurationSec), + id: account.ID, + userIdx: idx, + lastSec: protocol.Timestamp(nowSec - cacheDurationSec), } v.generateNewHashes(protocol.Timestamp(nowSec+cacheDurationSec), idx, entry) v.ids = append(v.ids, entry) for _, alterid := range account.AlterIDs { entry := &idEntry{ - id: alterid, - userIdx: idx, - lastSec: protocol.Timestamp(nowSec - cacheDurationSec), + id: alterid, + userIdx: idx, + lastSec: protocol.Timestamp(nowSec - cacheDurationSec), } v.generateNewHashes(protocol.Timestamp(nowSec+cacheDurationSec), idx, entry) v.ids = append(v.ids, entry) diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index 3fcf3ceb7..0bc02c8d8 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -364,7 +364,7 @@ func (w *SendingWorker) CloseWrite() { } func (w *SendingWorker) IsEmpty() bool { - w.RLock() + w.RLock() defer w.RUnlock() return w.window.IsEmpty()