@@ -164,32 +164,32 @@ func Test_parseTypeAction(t *testing.T) {
164164 stgs := & Settings {DefaultSpeed : 10 }
165165
166166 tests := []struct {
167- input map [string ]interface {}
167+ input map [string ]any
168168 want Action
169169 wantErr bool
170170 }{
171171 {
172- map [string ]interface {} {"type" : "Hello World" },
172+ map [string ]any {"type" : "Hello World" },
173173 & TypeAction {Type : "Hello World" , Count : 1 , Speed : stgs .DefaultSpeed },
174174 false ,
175175 },
176176 {
177- map [string ]interface {} {"type" : "Hello World" , "count" : 10 },
177+ map [string ]any {"type" : "Hello World" , "count" : 10 },
178178 & TypeAction {Type : "Hello World" , Count : 10 , Speed : stgs .DefaultSpeed },
179179 false ,
180180 },
181181 {
182- map [string ]interface {} {"type" : "Hello World" , "speed" : 500 },
182+ map [string ]any {"type" : "Hello World" , "speed" : 500 },
183183 & TypeAction {Type : "Hello World" , Count : 1 , Speed : 500 },
184184 false ,
185185 },
186186 {
187- map [string ]interface {} {"type" : "Hello World" , "count" : 10 , "speed" : 500 },
187+ map [string ]any {"type" : "Hello World" , "count" : 10 , "speed" : 500 },
188188 & TypeAction {Type : "Hello World" , Count : 10 , Speed : 500 },
189189 false ,
190190 },
191191 {
192- map [string ]interface {} {"type" : "Hello World" , "a" : "A" },
192+ map [string ]any {"type" : "Hello World" , "a" : "A" },
193193 nil ,
194194 true ,
195195 },
@@ -211,32 +211,32 @@ func Test_parseKeyAction(t *testing.T) {
211211 stgs := & Settings {DefaultSpeed : 10 }
212212
213213 tests := []struct {
214- input map [string ]interface {}
214+ input map [string ]any
215215 want Action
216216 wantErr bool
217217 }{
218218 {
219- map [string ]interface {} {"key" : "enter" },
219+ map [string ]any {"key" : "enter" },
220220 & KeyAction {Key : "enter" , Count : 1 , Speed : stgs .DefaultSpeed },
221221 false ,
222222 },
223223 {
224- map [string ]interface {} {"key" : "enter" , "count" : 10 },
224+ map [string ]any {"key" : "enter" , "count" : 10 },
225225 & KeyAction {Key : "enter" , Count : 10 , Speed : stgs .DefaultSpeed },
226226 false ,
227227 },
228228 {
229- map [string ]interface {} {"key" : "enter" , "speed" : 500 },
229+ map [string ]any {"key" : "enter" , "speed" : 500 },
230230 & KeyAction {Key : "enter" , Count : 1 , Speed : 500 },
231231 false ,
232232 },
233233 {
234- map [string ]interface {} {"key" : "enter" , "count" : 10 , "speed" : 500 },
234+ map [string ]any {"key" : "enter" , "count" : 10 , "speed" : 500 },
235235 & KeyAction {Key : "enter" , Count : 10 , Speed : 500 },
236236 false ,
237237 },
238238 {
239- map [string ]interface {} {"key" : "enter" , "a" : "A" },
239+ map [string ]any {"key" : "enter" , "a" : "A" },
240240 nil ,
241241 true ,
242242 },
@@ -256,17 +256,17 @@ func Test_parseKeyAction(t *testing.T) {
256256
257257func Test_parseSleepAction (t * testing.T ) {
258258 tests := []struct {
259- input map [string ]interface {}
259+ input map [string ]any
260260 want Action
261261 wantErr bool
262262 }{
263263 {
264- map [string ]interface {} {"sleep" : 3000 },
264+ map [string ]any {"sleep" : 3000 },
265265 & SleepAction {Sleep : 3000 },
266266 false ,
267267 },
268268 {
269- map [string ]interface {} {"sleep" : 3000 , "a" : "A" },
269+ map [string ]any {"sleep" : 3000 , "a" : "A" },
270270 nil ,
271271 true ,
272272 },
@@ -286,22 +286,22 @@ func Test_parseSleepAction(t *testing.T) {
286286
287287func Test_parsePauseAction (t * testing.T ) {
288288 tests := []struct {
289- input map [string ]interface {}
289+ input map [string ]any
290290 want Action
291291 wantErr bool
292292 }{
293293 {
294- map [string ]interface {} {"pause" : nil },
294+ map [string ]any {"pause" : nil },
295295 & PauseAction {},
296296 false ,
297297 },
298298 {
299- map [string ]interface {} {"pause" : struct {}{}},
299+ map [string ]any {"pause" : struct {}{}},
300300 & PauseAction {},
301301 false ,
302302 },
303303 {
304- map [string ]interface {} {"pause" : nil , "a" : "A" },
304+ map [string ]any {"pause" : nil , "a" : "A" },
305305 nil ,
306306 true ,
307307 },
@@ -323,32 +323,32 @@ func Test_parseCtrlAction(t *testing.T) {
323323 stgs := & Settings {DefaultSpeed : 10 }
324324
325325 tests := []struct {
326- input map [string ]interface {}
326+ input map [string ]any
327327 want Action
328328 wantErr bool
329329 }{
330330 {
331- map [string ]interface {} {"ctrl" : "c" },
331+ map [string ]any {"ctrl" : "c" },
332332 & CtrlAction {Ctrl : "c" , Count : 1 , Speed : 10 },
333333 false ,
334334 },
335335 {
336- map [string ]interface {} {"ctrl" : "c" , "count" : 10 },
336+ map [string ]any {"ctrl" : "c" , "count" : 10 },
337337 & CtrlAction {Ctrl : "c" , Count : 10 , Speed : stgs .DefaultSpeed },
338338 false ,
339339 },
340340 {
341- map [string ]interface {} {"ctrl" : "c" , "speed" : 500 },
341+ map [string ]any {"ctrl" : "c" , "speed" : 500 },
342342 & CtrlAction {Ctrl : "c" , Count : 1 , Speed : 500 },
343343 false ,
344344 },
345345 {
346- map [string ]interface {} {"ctrl" : "c" , "count" : 10 , "speed" : 500 },
346+ map [string ]any {"ctrl" : "c" , "count" : 10 , "speed" : 500 },
347347 & CtrlAction {Ctrl : "c" , Count : 10 , Speed : 500 },
348348 false ,
349349 },
350350 {
351- map [string ]interface {} {"ctrl" : "c" , "a" : "A" },
351+ map [string ]any {"ctrl" : "c" , "a" : "A" },
352352 nil ,
353353 true ,
354354 },
@@ -368,22 +368,22 @@ func Test_parseCtrlAction(t *testing.T) {
368368
369369func Test_parseScreenshotAction (t * testing.T ) {
370370 tests := []struct {
371- input map [string ]interface {}
371+ input map [string ]any
372372 want Action
373373 wantErr bool
374374 }{
375375 {
376- map [string ]interface {} {"screenshot" : nil },
376+ map [string ]any {"screenshot" : nil },
377377 & ScreenshotAction {},
378378 false ,
379379 },
380380 {
381- map [string ]interface {} {"screenshot" : "SCREENSHOT" },
381+ map [string ]any {"screenshot" : "SCREENSHOT" },
382382 & ScreenshotAction {Screenshot : util .String ("SCREENSHOT" )},
383383 false ,
384384 },
385385 {
386- map [string ]interface {} {"screenshot" : nil , "a" : "A" },
386+ map [string ]any {"screenshot" : nil , "a" : "A" },
387387 nil ,
388388 true ,
389389 },
0 commit comments