@@ -94,7 +94,7 @@ type tracer struct {
9494 prefix string
9595}
9696
97- func (tracer * tracer ) Printf (format string , args ... interface {} ) {
97+ func (tracer * tracer ) Printf (format string , args ... any ) {
9898 log .Trace ().Msgf (tracer .prefix + " " + format , args ... )
9999}
100100
@@ -485,29 +485,29 @@ func (api *API) CreatePage(
485485 title string ,
486486 body string ,
487487) (* PageInfo , error ) {
488- payload := map [string ]interface {} {
488+ payload := map [string ]any {
489489 "type" : pageType ,
490490 "title" : title ,
491- "space" : map [string ]interface {} {
491+ "space" : map [string ]any {
492492 "key" : space ,
493493 },
494- "body" : map [string ]interface {} {
495- "storage" : map [string ]interface {} {
494+ "body" : map [string ]any {
495+ "storage" : map [string ]any {
496496 "representation" : "storage" ,
497497 "value" : body ,
498498 },
499499 },
500- "metadata" : map [string ]interface {} {
501- "properties" : map [string ]interface {} {
502- "editor" : map [string ]interface {} {
500+ "metadata" : map [string ]any {
501+ "properties" : map [string ]any {
502+ "editor" : map [string ]any {
503503 "value" : "v2" ,
504504 },
505505 },
506506 },
507507 }
508508
509509 if parent != nil {
510- payload ["ancestors" ] = []map [string ]interface {} {
510+ payload ["ancestors" ] = []map [string ]any {
511511 {"id" : parent .ID },
512512 }
513513 }
@@ -528,20 +528,20 @@ func (api *API) CreatePage(
528528
529529func (api * API ) UpdatePage (page * PageInfo , newContent string , minorEdit bool , versionMessage string , appearance string , emojiString string ) error {
530530 nextPageVersion := page .Version .Number + 1
531- oldAncestors := []map [string ]interface {} {}
531+ oldAncestors := []map [string ]any {}
532532
533533 if page .Type != "blogpost" && len (page .Ancestors ) > 0 {
534534 // picking only the last one, which is required by confluence
535- oldAncestors = []map [string ]interface {} {
535+ oldAncestors = []map [string ]any {
536536 {"id" : page .Ancestors [len (page .Ancestors )- 1 ].ID },
537537 }
538538 }
539539
540- properties := map [string ]interface {} {
540+ properties := map [string ]any {
541541 // Fix to set full-width as has changed on Confluence APIs again.
542542 // https://jira.atlassian.com/browse/CONFCLOUD-65447
543543 //
544- "content-appearance-published" : map [string ]interface {} {
544+ "content-appearance-published" : map [string ]any {
545545 "value" : appearance ,
546546 },
547547 // content-appearance-draft should not be set as this is impacted by
@@ -555,37 +555,37 @@ func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, ve
555555 }
556556 unicodeHex := fmt .Sprintf ("%x" , r )
557557
558- properties ["emoji-title-draft" ] = map [string ]interface {} {
558+ properties ["emoji-title-draft" ] = map [string ]any {
559559 "value" : unicodeHex ,
560560 }
561- properties ["emoji-title-published" ] = map [string ]interface {} {
561+ properties ["emoji-title-published" ] = map [string ]any {
562562 "value" : unicodeHex ,
563563 }
564564 }
565565
566- payload := map [string ]interface {} {
566+ payload := map [string ]any {
567567 "id" : page .ID ,
568568 "type" : page .Type ,
569569 "title" : page .Title ,
570- "version" : map [string ]interface {} {
570+ "version" : map [string ]any {
571571 "number" : nextPageVersion ,
572572 "minorEdit" : minorEdit ,
573573 "message" : versionMessage ,
574574 },
575575 "ancestors" : oldAncestors ,
576- "body" : map [string ]interface {} {
577- "storage" : map [string ]interface {} {
576+ "body" : map [string ]any {
577+ "storage" : map [string ]any {
578578 "value" : newContent ,
579579 "representation" : "storage" ,
580580 },
581581 },
582- "metadata" : map [string ]interface {} {
582+ "metadata" : map [string ]any {
583583 "properties" : properties ,
584584 },
585585 }
586586
587587 request , err := api .rest .Res (
588- "content/" + page .ID , & map [string ]interface {} {},
588+ "content/" + page .ID , & map [string ]any {},
589589 ).Put (payload )
590590 if err != nil {
591591 return err
@@ -600,10 +600,10 @@ func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, ve
600600
601601func (api * API ) AddPageLabels (page * PageInfo , newLabels []string ) (* LabelInfo , error ) {
602602
603- labels := []map [string ]interface {} {}
603+ labels := []map [string ]any {}
604604 for _ , label := range newLabels {
605605 if label != "" {
606- item := map [string ]interface {} {
606+ item := map [string ]any {
607607 "prefix" : "global" ,
608608 "name" : label ,
609609 }
@@ -765,17 +765,17 @@ func (api *API) RestrictPageUpdatesCloud(
765765 user = currentUser
766766 }
767767
768- var result interface {}
768+ var result any
769769
770770 request , err := api .rest .
771771 Res ("content" ).
772772 Id (page .ID ).
773773 Res ("restriction" , & result ).
774- Post ([]map [string ]interface {} {
774+ Post ([]map [string ]any {
775775 {
776776 "operation" : "update" ,
777- "restrictions" : map [string ]interface {} {
778- "user" : []map [string ]interface {} {
777+ "restrictions" : map [string ]any {
778+ "user" : []map [string ]any {
779779 {
780780 "type" : "known" ,
781781 "accountId" : user .AccountID ,
@@ -801,15 +801,15 @@ func (api *API) RestrictPageUpdatesServer(
801801) error {
802802 var (
803803 err error
804- result interface {}
804+ result any
805805 )
806806
807807 request , err := api .json .Res (
808808 "setContentPermissions" , & result ,
809- ).Post ([]interface {} {
809+ ).Post ([]any {
810810 page .ID ,
811811 "Edit" ,
812- []map [string ]interface {} {
812+ []map [string ]any {
813813 {
814814 "userName" : allowedUser ,
815815 },
0 commit comments