@@ -38,7 +38,7 @@ func ConfigureModules(cnf *types.ConfigurationSection, mutex *sync.Mutex) {
3838 time .Sleep (delayCheckConfig )
3939
4040 if err := utils .ConnectionChecker (constants .URL_CHECK_CONNECTION ); err != nil {
41- catcher .Error ("Failed to establish connection" , err , map [ string ] any {} )
41+ catcher .Error ("Failed to establish connection" , err , nil )
4242 }
4343
4444 tempModuleConfig , err := client .GetUTMConfig (enum .BITDEFENDER )
@@ -47,7 +47,7 @@ func ConfigureModules(cnf *types.ConfigurationSection, mutex *sync.Mutex) {
4747 continue
4848 }
4949 if (err .Error () != "" ) && (err .Error () != " " ) {
50- catcher .Error ("error getting configuration of the Bitdefender module" , err , map [ string ] any {} )
50+ catcher .Error ("error getting configuration of the Bitdefender module" , err , nil )
5151 }
5252 continue
5353 }
@@ -61,16 +61,16 @@ func ConfigureModules(cnf *types.ConfigurationSection, mutex *sync.Mutex) {
6161 if ! araAnyEmpty (group .Configurations [0 ].ConfValue , group .Configurations [1 ].ConfValue , group .Configurations [2 ].ConfValue , group .Configurations [3 ].ConfValue ) {
6262 catcher .Info ("new configuration found" , map [string ]any {"groupName" : group .GroupName , "master" : group .Configurations [2 ].ConfValue , "CompanyIDs" : group .Configurations [3 ].ConfValue })
6363 if err := confBDGZApiPush (group , "sendConf" ); err != nil {
64- catcher .Error ("error sending configuration" , err , map [ string ] any {} )
64+ catcher .Error ("error sending configuration" , err , nil )
6565 continue
6666 }
6767 time .Sleep (15 * time .Second )
6868 if err := confBDGZApiPush (group , "getConf" ); err != nil {
69- catcher .Error ("error getting configuration" , err , map [ string ] any {} )
69+ catcher .Error ("error getting configuration" , err , nil )
7070 continue
7171 }
7272 if err := confBDGZApiPush (group , "sendTest" ); err != nil {
73- catcher .Error ("error sending test event" , err , map [ string ] any {} )
73+ catcher .Error ("error sending test event" , err , nil )
7474 continue
7575 }
7676
@@ -101,7 +101,7 @@ func confBDGZApiPush(config types.ModuleGroup, operation string) error {
101101 for i := 0 ; i < 5 ; i ++ {
102102 response , err := fn (config )
103103 if err != nil {
104- catcher .Error ("error sending configuration" , err , map [ string ] any {} )
104+ catcher .Error ("error sending configuration" , err , nil )
105105 time .Sleep (1 * time .Minute )
106106 continue
107107 }
@@ -114,7 +114,7 @@ func confBDGZApiPush(config types.ModuleGroup, operation string) error {
114114 regex := regexp .MustCompile (`result":true` )
115115 match := regex .Match ([]byte (string (myBody )))
116116 if match {
117- catcher .Info ("Configuration sent correctly" , map [ string ] any {} )
117+ catcher .Info ("Configuration sent correctly" , nil )
118118 }
119119 }
120120 return nil
@@ -123,33 +123,33 @@ func confBDGZApiPush(config types.ModuleGroup, operation string) error {
123123}
124124
125125func sendPushEventSettings (config types.ModuleGroup ) (* http.Response , error ) {
126- catcher .Info ("Sending configuration..." , map [ string ] any {} )
126+ catcher .Info ("Sending configuration..." , nil )
127127 byteTemplate := getTemplateSetPush (config )
128128 body , err := json .Marshal (byteTemplate )
129129 if err != nil {
130- catcher .Error ("error when marshaling the request body to send the configuration" , err , map [ string ] any {} )
130+ catcher .Error ("error when marshaling the request body to send the configuration" , err , nil )
131131 return nil , err
132132 }
133133 return sendRequest (body , config )
134134}
135135
136136func getPushEventSettings (config types.ModuleGroup ) (* http.Response , error ) {
137- catcher .Info ("Checking configuration..." , map [ string ] any {} )
137+ catcher .Info ("Checking configuration..." , nil )
138138 byteTemplate := getTemplateGet ()
139139 body , err := json .Marshal (byteTemplate )
140140 if err != nil {
141- catcher .Error ("error when marshaling the request body to send the configuration" , err , map [ string ] any {} )
141+ catcher .Error ("error when marshaling the request body to send the configuration" , err , nil )
142142 return nil , err
143143 }
144144 return sendRequest (body , config )
145145}
146146
147147func sendTestPushEvent (config types.ModuleGroup ) (* http.Response , error ) {
148- catcher .Info ("Sending Event Test..." , map [ string ] any {} )
148+ catcher .Info ("Sending Event Test..." , nil )
149149 byteTemplate := getTemplateTest ()
150150 body , err := json .Marshal (byteTemplate )
151151 if err != nil {
152- catcher .Error ("error when marshaling the request body to send the configuration" , err , map [ string ] any {} )
152+ catcher .Error ("error when marshaling the request body to send the configuration" , err , nil )
153153 return nil , err
154154 }
155155 return sendRequest (body , config )
0 commit comments