mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
Replace interface{} with any
This commit is contained in:
committed by
Dan Christian Bogos
parent
1d7bd1389b
commit
113e2a2bdf
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user