mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-18 07:42:20 +00:00
Technical depth: Adding Go linter to CI (#734)
This commit is contained in:
@@ -345,7 +345,7 @@ func (p *RedisProtocol) Read() (packet *RedisPacket, err error) {
|
||||
if packet.Type == types[plusByte] {
|
||||
packet.Keyword = RedisKeyword(strings.ToUpper(val))
|
||||
if !isValidRedisKeyword(keywords, packet.Keyword) {
|
||||
err = errors.New(fmt.Sprintf("Unrecognized keyword: %s", string(packet.Command)))
|
||||
err = fmt.Errorf("Unrecognized keyword: %s", string(packet.Command))
|
||||
return
|
||||
}
|
||||
} else {
|
||||
@@ -363,7 +363,7 @@ func (p *RedisProtocol) Read() (packet *RedisPacket, err error) {
|
||||
|
||||
if packet.Command != "" {
|
||||
if !isValidRedisCommand(commands, packet.Command) {
|
||||
err = errors.New(fmt.Sprintf("Unrecognized command: %s", string(packet.Command)))
|
||||
err = fmt.Errorf("Unrecognized command: %s", string(packet.Command))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@@ -96,6 +96,6 @@ func (h *tcpReader) run(wg *sync.WaitGroup) {
|
||||
b := bufio.NewReader(h)
|
||||
err := h.extension.Dissector.Dissect(b, h.isClient, h.tcpID, h.counterPair, h.superTimer, h.parent.superIdentifier, h.emitter, filteringOptions)
|
||||
if err != nil {
|
||||
io.Copy(ioutil.Discard, b)
|
||||
io.Copy(ioutil.Discard, b) //nolint
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user