Updated console commands with constants

This commit is contained in:
Trial97
2020-12-07 11:56:31 +02:00
committed by Dan Christian Bogos
parent dd48ce1057
commit 1146e2ef2f
24 changed files with 77 additions and 61 deletions

View File

@@ -20,6 +20,7 @@ package console
import (
"github.com/cgrates/cgrates/config"
"github.com/cgrates/cgrates/utils"
)
func init() {
@@ -48,7 +49,7 @@ func (self *CmdParse) Name() string {
}
func (self *CmdParse) RpcMethod() string {
return ""
return utils.EmptyString
}
func (self *CmdParse) RpcParams(reset bool) interface{} {
@@ -67,10 +68,10 @@ func (self *CmdParse) PostprocessRpcParams() error {
}
func (self *CmdParse) LocalExecute() string {
if self.rpcParams.Expression == "" {
if self.rpcParams.Expression == utils.EmptyString {
return "Empty expression error"
}
if self.rpcParams.Value == "" {
if self.rpcParams.Value == utils.EmptyString {
return "Empty value error"
}
if rsrField, err := config.NewRSRParser(self.rpcParams.Expression); err != nil {