@@ -27,6 +27,7 @@ import (
2727 "github.com/urfave/cli/v3"
2828 "google.golang.org/protobuf/encoding/protojson"
2929
30+ "github.com/livekit/livekit-cli/pkg/util"
3031 "github.com/livekit/protocol/logger"
3132
3233 "github.com/livekit/protocol/livekit"
@@ -635,7 +636,7 @@ func createRoom(ctx context.Context, cmd *cli.Command) error {
635636 return err
636637 }
637638
638- PrintJSON (room )
639+ util . PrintJSON (room )
639640 return nil
640641}
641642
@@ -644,7 +645,7 @@ func listRooms(ctx context.Context, cmd *cli.Command) error {
644645 if cmd .Bool ("verbose" ) && len (names ) > 0 {
645646 fmt .Printf (
646647 "Querying rooms matching %s" ,
647- strings .Join (mapStrings (names , wrapWith ("\" " )), ", " ),
648+ strings .Join (util . MapStrings (names , util . WrapWith ("\" " )), ", " ),
648649 )
649650 }
650651
@@ -659,7 +660,7 @@ func listRooms(ctx context.Context, cmd *cli.Command) error {
659660 }
660661
661662 if cmd .Bool ("json" ) {
662- PrintJSON (res )
663+ util . PrintJSON (res )
663664 } else {
664665 table := CreateTable ().Headers ("RoomID" , "Name" , "Participants" , "Publishers" )
665666 for _ , rm := range res .Rooms {
@@ -688,7 +689,7 @@ func _deprecatedListRoom(ctx context.Context, cmd *cli.Command) error {
688689 return nil
689690 }
690691 rm := res .Rooms [0 ]
691- PrintJSON (rm )
692+ util . PrintJSON (rm )
692693 return nil
693694}
694695
@@ -720,7 +721,7 @@ func updateRoomMetadata(ctx context.Context, cmd *cli.Command) error {
720721 }
721722
722723 fmt .Println ("Updated room metadata" )
723- PrintJSON (res )
724+ util . PrintJSON (res )
724725 return nil
725726}
726727
@@ -735,7 +736,7 @@ func _deprecatedUpdateRoomMetadata(ctx context.Context, cmd *cli.Command) error
735736 }
736737
737738 fmt .Println ("Updated room metadata" )
738- PrintJSON (res )
739+ util . PrintJSON (res )
739740 return nil
740741}
741742
@@ -934,7 +935,7 @@ func getParticipant(ctx context.Context, cmd *cli.Command) error {
934935 return err
935936 }
936937
937- PrintJSON (res )
938+ util . PrintJSON (res )
938939
939940 return nil
940941}
@@ -971,7 +972,7 @@ func updateParticipant(ctx context.Context, cmd *cli.Command) error {
971972 }
972973
973974 fmt .Println ("updating participant..." )
974- PrintJSON (req )
975+ util . PrintJSON (req )
975976 if _ , err := roomClient .UpdateParticipant (ctx , req ); err != nil {
976977 return err
977978 }
0 commit comments