mirror of
https://github.com/wader/fq.git
synced 2024-11-26 21:55:57 +03:00
Merge pull request #751 from wader/bump-github-golangci-lint-1.54.2
Update github-golangci-lint to 1.54.2 from 1.54.1
This commit is contained in:
commit
4930a3e3cc
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
GOLANGCILINT_VERSION: "1.54.1"
|
||||
GOLANGCILINT_VERSION: "1.54.2"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
@ -28,8 +28,8 @@ type TCPDirection struct {
|
||||
}
|
||||
|
||||
type TCPConnection struct {
|
||||
Client TCPDirection
|
||||
Server TCPDirection
|
||||
Client *TCPDirection
|
||||
Server *TCPDirection
|
||||
tcpState *reassembly.TCPSimpleFSM
|
||||
optChecker *reassembly.TCPOptionCheck
|
||||
net gopacket.Flow
|
||||
@ -62,9 +62,9 @@ func (t *TCPConnection) ReassembledSG(sg reassembly.ScatterGather, ac reassembly
|
||||
var d *TCPDirection
|
||||
switch dir {
|
||||
case reassembly.TCPDirClientToServer:
|
||||
d = &t.Client
|
||||
d = t.Client
|
||||
case reassembly.TCPDirServerToClient:
|
||||
d = &t.Server
|
||||
d = t.Server
|
||||
default:
|
||||
panic("unreachable")
|
||||
}
|
||||
@ -115,14 +115,14 @@ func (fd *Decoder) New(net, transport gopacket.Flow, tcp *layers.TCP, ac reassem
|
||||
}
|
||||
|
||||
stream := &TCPConnection{
|
||||
Client: TCPDirection{
|
||||
Client: &TCPDirection{
|
||||
Endpoint: TCPEndpoint{
|
||||
IP: append([]byte(nil), net.Src().Raw()...),
|
||||
Port: clientPort,
|
||||
},
|
||||
Buffer: &bytes.Buffer{},
|
||||
},
|
||||
Server: TCPDirection{
|
||||
Server: &TCPDirection{
|
||||
Endpoint: TCPEndpoint{
|
||||
IP: append([]byte(nil), net.Dst().Raw()...),
|
||||
Port: serverPort,
|
||||
|
@ -59,7 +59,7 @@ func fieldFlows(d *decode.D, fd *flowsdecoder.Decoder, tcpStreamFormat decode.Gr
|
||||
var clientV any
|
||||
var serverV any
|
||||
d.FieldStruct("client", func(d *decode.D) {
|
||||
clientV = f(d, &s.Client, format.TCP_Stream_In{
|
||||
clientV = f(d, s.Client, format.TCP_Stream_In{
|
||||
IsClient: true,
|
||||
HasStart: s.Client.HasStart,
|
||||
HasEnd: s.Client.HasEnd,
|
||||
@ -69,7 +69,7 @@ func fieldFlows(d *decode.D, fd *flowsdecoder.Decoder, tcpStreamFormat decode.Gr
|
||||
})
|
||||
})
|
||||
d.FieldStruct("server", func(d *decode.D) {
|
||||
serverV = f(d, &s.Server, format.TCP_Stream_In{
|
||||
serverV = f(d, s.Server, format.TCP_Stream_In{
|
||||
IsClient: false,
|
||||
HasStart: s.Server.HasStart,
|
||||
HasEnd: s.Server.HasEnd,
|
||||
|
@ -120,7 +120,7 @@ type idx1Sample struct {
|
||||
|
||||
type aviStream struct {
|
||||
hasFormat bool
|
||||
format decode.Group
|
||||
format *decode.Group
|
||||
formatInArg any
|
||||
indexes []ranges.Range
|
||||
ixSamples []ranges.Range
|
||||
@ -390,11 +390,11 @@ func aviDecode(d *decode.D) any {
|
||||
format.BMPTagH264_UMSV,
|
||||
format.BMPTagH264_tshd,
|
||||
format.BMPTagH264_INMC:
|
||||
s.format = aviMpegAVCAUGroup
|
||||
s.format = &aviMpegAVCAUGroup
|
||||
s.hasFormat = true
|
||||
case format.BMPTagHEVC,
|
||||
format.BMPTagHEVC_H265:
|
||||
s.format = aviMpegHEVCAUGroup
|
||||
s.format = &aviMpegHEVCAUGroup
|
||||
s.hasFormat = true
|
||||
}
|
||||
|
||||
@ -417,11 +417,11 @@ func aviDecode(d *decode.D) any {
|
||||
|
||||
switch formatTag {
|
||||
case format.WAVTagMP3:
|
||||
s.format = aviMp3FrameGroup
|
||||
s.format = &aviMp3FrameGroup
|
||||
s.hasFormat = true
|
||||
case format.WAVTagFLAC:
|
||||
// TODO: can flac in avi have streaminfo somehow?
|
||||
s.format = aviFLACFrameGroup
|
||||
s.format = &aviFLACFrameGroup
|
||||
s.hasFormat = true
|
||||
}
|
||||
case "iavs":
|
||||
@ -521,7 +521,7 @@ func aviDecode(d *decode.D) any {
|
||||
index < len(streams) &&
|
||||
streams[index].hasFormat:
|
||||
s := streams[index]
|
||||
d.FieldFormatLen("data", d.BitsLeft(), &s.format, s.formatInArg)
|
||||
d.FieldFormatLen("data", d.BitsLeft(), s.format, s.formatInArg)
|
||||
default:
|
||||
d.FieldRawLen("data", d.BitsLeft())
|
||||
}
|
||||
@ -559,7 +559,7 @@ func aviDecode(d *decode.D) any {
|
||||
decodeSample := func(d *decode.D, sr ranges.Range) {
|
||||
d.RangeFn(sr.Start, sr.Len, func(d *decode.D) {
|
||||
if sr.Len > 0 && ai.DecodeSamples && s.hasFormat {
|
||||
d.FieldFormat("sample", &s.format, s.formatInArg)
|
||||
d.FieldFormat("sample", s.format, s.formatInArg)
|
||||
} else {
|
||||
d.FieldRawLen("sample", d.BitsLeft())
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ func fromHTMLToArray(n *html.Node) any {
|
||||
return f(n)
|
||||
}
|
||||
|
||||
var htmlMagicRe = &lazyre.RE{S: `` +
|
||||
var htmlMagicRE = &lazyre.RE{S: `` +
|
||||
`^` + // anchor to start
|
||||
`(?i)` + // case insensitive
|
||||
`[[:graph:][:space:]]{0,64}?` + // 0-64 non-control ASCII lazily to allow comment etc
|
||||
@ -214,7 +214,7 @@ func decodeHTML(d *decode.D) any {
|
||||
if d.ArgAs(&pi) {
|
||||
// if probing the input has to start with "<html" or "<!DOCTYPE html" this
|
||||
// is because the html parser will always succeed so we have to be careful
|
||||
if d.RE(htmlMagicRe.Must()) == nil {
|
||||
if d.RE(htmlMagicRE.Must()) == nil {
|
||||
d.Fatalf("no <html> or <!DOCTYPE html> found")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user