mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Removed warnings from go staticcheck
This commit is contained in:
committed by
Dan Christian Bogos
parent
529430bd4d
commit
c2dacc42c1
@@ -99,15 +99,15 @@ func executeCommand(command string, client *rpcclient.RPCClient) {
|
||||
if cmd.RpcMethod() != utils.EmptyString {
|
||||
res := cmd.RpcResult()
|
||||
param := cmd.RpcParams(false)
|
||||
switch param.(type) {
|
||||
switch p := param.(type) {
|
||||
case *console.EmptyWrapper:
|
||||
param = utils.EmptyString
|
||||
case *console.StringWrapper:
|
||||
param = param.(*console.StringWrapper).Item
|
||||
param = p.Item
|
||||
case *console.StringSliceWrapper:
|
||||
param = param.(*console.StringSliceWrapper).Items
|
||||
param = p.Items
|
||||
case *console.StringMapWrapper:
|
||||
param = param.(*console.StringMapWrapper).Items
|
||||
param = p.Items
|
||||
}
|
||||
|
||||
if rpcErr := client.Call(context.TODO(), cmd.RpcMethod(), param, res); rpcErr != nil {
|
||||
|
||||
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
@@ -52,9 +51,8 @@ type FileReaderTester struct {
|
||||
runs int
|
||||
reqSep []byte
|
||||
|
||||
rdr io.Reader
|
||||
conn net.Conn
|
||||
connScnr *bufio.Scanner
|
||||
rdr io.Reader
|
||||
conn net.Conn
|
||||
}
|
||||
|
||||
func (frt *FileReaderTester) connSendReq(req []byte) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user