@@ -226,7 +226,7 @@ func (c *DriveGetCmd) Run(ctx context.Context, flags *RootFlags) error {
226226 }
227227
228228 if outfmt .IsJSON (ctx ) {
229- return outfmt .WriteJSON (os .Stdout , map [string ]any {"file" : f })
229+ return outfmt .WriteJSON (os .Stdout , map [string ]any {strFile : f })
230230 }
231231
232232 u .Out ().Printf ("id\t %s" , f .Id )
@@ -370,7 +370,7 @@ func (c *DriveUploadCmd) Run(ctx context.Context, flags *RootFlags) error {
370370 }
371371
372372 if outfmt .IsJSON (ctx ) {
373- return outfmt .WriteJSON (os .Stdout , map [string ]any {"file" : created })
373+ return outfmt .WriteJSON (os .Stdout , map [string ]any {strFile : created })
374374 }
375375
376376 u .Out ().Printf ("id\t %s" , created .Id )
@@ -518,7 +518,7 @@ func (c *DriveMoveCmd) Run(ctx context.Context, flags *RootFlags) error {
518518 }
519519
520520 if outfmt .IsJSON (ctx ) {
521- return outfmt .WriteJSON (os .Stdout , map [string ]any {"file" : updated })
521+ return outfmt .WriteJSON (os .Stdout , map [string ]any {strFile : updated })
522522 }
523523
524524 u .Out ().Printf ("id\t %s" , updated .Id )
@@ -561,7 +561,7 @@ func (c *DriveRenameCmd) Run(ctx context.Context, flags *RootFlags) error {
561561 }
562562
563563 if outfmt .IsJSON (ctx ) {
564- return outfmt .WriteJSON (os .Stdout , map [string ]any {"file" : updated })
564+ return outfmt .WriteJSON (os .Stdout , map [string ]any {strFile : updated })
565565 }
566566
567567 u .Out ().Printf ("id\t %s" , updated .Id )
@@ -823,7 +823,7 @@ func driveType(mimeType string) string {
823823 if mimeType == "application/vnd.google-apps.folder" {
824824 return "folder"
825825 }
826- return "file" //nolint:goconst // readability; used as a display value and JSON key elsewhere.
826+ return strFile
827827}
828828
829829func formatDateTime (iso string ) string {
0 commit comments