1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-17 10:44:26 -04:00

Lint: add nolint flags to avoid SA1029

This commit is contained in:
秋のかえで 2022-08-19 20:09:39 +08:00
parent a788be738e
commit 8f883040ab
No known key found for this signature in database
GPG Key ID: E343534293081E5D

View File

@ -126,21 +126,21 @@ func createStatusFromConfig(config *UDPProtocolConfig) (*status, error) { //noli
s.password = []byte(config.Password)
s.msgbus = ibus.NewMessageBus()
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsMessageBus, s.msgbus) //nolint:revive
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsMessageBus, s.msgbus) //nolint:revive,staticcheck
if config.ScramblePacket {
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPShouldMask, true) //nolint:revive
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPShouldMask, true) //nolint:revive,staticcheck
}
if s.config.EnableFec {
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPFECEnabled, true) //nolint:revive
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPFECEnabled, true) //nolint:revive,staticcheck
}
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPMask, string(s.password)) //nolint:revive
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUDPMask, string(s.password)) //nolint:revive,staticcheck
if config.HandshakeMaskingPaddingSize != 0 {
ctxv := &interfaces.ExtraOptionsUsePacketArmorValue{PacketArmorPaddingTo: int(config.HandshakeMaskingPaddingSize), UsePacketArmor: true}
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUsePacketArmor, ctxv) //nolint:revive
s.ctx = context.WithValue(s.ctx, interfaces.ExtraOptionsUsePacketArmor, ctxv) //nolint:revive,staticcheck
}
return s, nil