@@ -209,15 +209,15 @@ func init() {
209209 })
210210}
211211
212- func alarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
212+ func alarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
213213 ctx , span := beeline .StartSpan (ctx , "set_alarm" )
214214 defer span .Send ()
215215 if ! query .SupportsAction (ctx , "set_alarm" ) {
216216 return Error {Error : "You need to update the app on your watch to set alarms." }
217217 }
218218 input := args .(* AlarmInput )
219219 log .Println ("Asking watch to set an alarm..." )
220- requests <- map [string ]interface {} {
220+ requests <- map [string ]any {
221221 "time" : input .Time ,
222222 "isTimer" : false ,
223223 "name" : input .Name ,
@@ -229,7 +229,7 @@ func alarmImpl(ctx context.Context, quotaTracker *quota.Tracker, args interface{
229229 return resp
230230}
231231
232- func timerImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
232+ func timerImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
233233 ctx , span := beeline .StartSpan (ctx , "set_timer" )
234234 defer span .Send ()
235235 if ! query .SupportsAction (ctx , "set_alarm" ) {
@@ -241,7 +241,7 @@ func timerImpl(ctx context.Context, quotaTracker *quota.Tracker, args interface{
241241 if duration == 0 {
242242 return Error {Error : "You need to pass the timer duration in seconds to duration_seconds (e.g. duration_seconds=300 for a 5 minute timer)." }
243243 }
244- requests <- map [string ]interface {} {
244+ requests <- map [string ]any {
245245 "duration" : duration ,
246246 "isTimer" : true ,
247247 "name" : input .Name ,
@@ -253,7 +253,7 @@ func timerImpl(ctx context.Context, quotaTracker *quota.Tracker, args interface{
253253 return resp
254254}
255255
256- func alarmThought (i interface {} ) string {
256+ func alarmThought (i any ) string {
257257 args := i .(* AlarmInput )
258258 if args .Time == "" {
259259 return "Contemplating time"
@@ -262,7 +262,7 @@ func alarmThought(i interface{}) string {
262262 }
263263}
264264
265- func timerThought (i interface {} ) string {
265+ func timerThought (i any ) string {
266266 args := i .(* TimerInput )
267267 if args .Duration == 0 {
268268 return "Contemplating time"
@@ -271,15 +271,15 @@ func timerThought(i interface{}) string {
271271 }
272272}
273273
274- func deleteAlarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
274+ func deleteAlarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
275275 ctx , span := beeline .StartSpan (ctx , "delete_alarm" )
276276 defer span .Send ()
277277 if ! query .SupportsAction (ctx , "set_alarm" ) {
278278 return Error {Error : "You need to update the app on your watch to delete alarms." }
279279 }
280280 input := args .(* DeleteAlarmInput )
281281 log .Printf ("Asking watch to delete an alarm set for %s...\n " , input .Time )
282- requests <- map [string ]interface {} {
282+ requests <- map [string ]any {
283283 "time" : input .Time ,
284284 "isTimer" : false ,
285285 "action" : "set_alarm" ,
@@ -290,15 +290,15 @@ func deleteAlarmImpl(ctx context.Context, quotaTracker *quota.Tracker, args inte
290290 return resp
291291}
292292
293- func deleteTimerImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
293+ func deleteTimerImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
294294 ctx , span := beeline .StartSpan (ctx , "delete_timer" )
295295 defer span .Send ()
296296 if ! query .SupportsAction (ctx , "set_alarm" ) {
297297 return Error {Error : "You need to update the app on your watch to delete timers." }
298298 }
299299 input := args .(* DeleteTimerInput )
300300 log .Printf ("Asking watch to delete a timer set for %s...\n " , input .Time )
301- requests <- map [string ]interface {} {
301+ requests <- map [string ]any {
302302 "time" : input .Time ,
303303 "isTimer" : true ,
304304 "action" : "set_alarm" ,
@@ -309,22 +309,22 @@ func deleteTimerImpl(ctx context.Context, quotaTracker *quota.Tracker, args inte
309309 return resp
310310}
311311
312- func deleteAlarmThought (i interface {} ) string {
312+ func deleteAlarmThought (i any ) string {
313313 return "Deleting an alarm"
314314}
315315
316- func deleteTimerThought (i interface {} ) string {
316+ func deleteTimerThought (i any ) string {
317317 return "Deleting a timer"
318318}
319319
320- func getAlarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
320+ func getAlarmImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
321321 ctx , span := beeline .StartSpan (ctx , "get_alarm" )
322322 defer span .Send ()
323323 if ! query .SupportsAction (ctx , "get_alarm" ) {
324324 return Error {Error : "You need to update the app on your watch to get alarms." }
325325 }
326326 log .Println ("Asking watch to get alarms..." )
327- requests <- map [string ]interface {} {
327+ requests <- map [string ]any {
328328 "isTimer" : false ,
329329 "action" : "get_alarm" ,
330330 }
@@ -334,14 +334,14 @@ func getAlarmImpl(ctx context.Context, quotaTracker *quota.Tracker, args interfa
334334 return resp
335335}
336336
337- func getTimerImpl (ctx context.Context , quotaTracker * quota.Tracker , args interface {} , requests chan <- map [string ]interface {} , responses <- chan map [string ]interface {}) interface {} {
337+ func getTimerImpl (ctx context.Context , quotaTracker * quota.Tracker , args any , requests chan <- map [string ]any , responses <- chan map [string ]any ) any {
338338 ctx , span := beeline .StartSpan (ctx , "get_timer" )
339339 defer span .Send ()
340340 if ! query .SupportsAction (ctx , "get_alarm" ) {
341341 return Error {Error : "You need to update the app on your watch to get timers." }
342342 }
343343 log .Println ("Asking watch to get alarms..." )
344- requests <- map [string ]interface {} {
344+ requests <- map [string ]any {
345345 "isTimer" : true ,
346346 "action" : "get_alarm" ,
347347 }
@@ -351,10 +351,10 @@ func getTimerImpl(ctx context.Context, quotaTracker *quota.Tracker, args interfa
351351 return resp
352352}
353353
354- func getAlarmThought (i interface {} ) string {
354+ func getAlarmThought (i any ) string {
355355 return "Checking your alarms"
356356}
357357
358- func getTimerThought (i interface {} ) string {
358+ func getTimerThought (i any ) string {
359359 return "Checking your timers"
360360}
0 commit comments