Replace interface{} with any

This commit is contained in:
ionutboangiu
2023-05-29 11:44:03 -04:00
committed by Dan Christian Bogos
parent 1d7bd1389b
commit 113e2a2bdf
628 changed files with 7230 additions and 7230 deletions

View File

@@ -147,7 +147,7 @@ func cgrRunPreload(ctx *context.Context, cfg *config.CGRConfig, loaderIDs string
var reply string
for _, loaderID := range strings.Split(loaderIDs, utils.FieldsSep) {
if err = loader.GetLoaderS().V1Run(ctx, &loaders.ArgsProcessFolder{
APIOpts: map[string]interface{}{
APIOpts: map[string]any{
utils.MetaForceLock: true, // force lock will unlock the file in case is locked and return error
utils.MetaStopOnError: true,
},

View File

@@ -68,7 +68,7 @@ func TestSessionSReload1(t *testing.T) {
clientConect := make(chan birpc.ClientConnector, 1)
clientConect <- &testMockClients{
calls: func(ctx *context.Context, args, reply interface{}) error {
calls: func(ctx *context.Context, args, reply any) error {
rply, cancast := reply.(*[]*engine.ChrgSProcessEventReply)
if !cancast {
return fmt.Errorf("can't cast")
@@ -110,7 +110,7 @@ func TestSessionSReload1(t *testing.T) {
args := &utils.CGREvent{
Tenant: "cgrates.org",
ID: "testSSv1ItProcessEventInitiateSession",
Event: map[string]interface{}{
Event: map[string]any{
utils.Tenant: "cgrates.org",
utils.ToR: utils.MetaVoice,
utils.OriginID: "testSSv1ItProcessEvent",
@@ -122,7 +122,7 @@ func TestSessionSReload1(t *testing.T) {
utils.AnswerTime: time.Date(2018, time.January, 7, 16, 60, 10, 0, time.UTC),
utils.Usage: 0,
},
APIOpts: map[string]interface{}{
APIOpts: map[string]any{
utils.MetaRunID: utils.MetaDefault,
utils.OptsSesInitiate: true,
utils.MetaThresholds: true,

View File

@@ -33,10 +33,10 @@ import (
)
type testMockClients struct {
calls func(_ *context.Context, _, _ interface{}) error
calls func(_ *context.Context, _, _ any) error
}
func (sT *testMockClients) Call(ctx *context.Context, method string, arg, rply interface{}) error {
func (sT *testMockClients) Call(ctx *context.Context, method string, arg, rply any) error {
return sT.calls(ctx, arg, rply)
}