@@ -564,8 +564,8 @@ Examples:
564
564
cmdkit .StringArg ("path" , true , false , "Path to file to be read." ),
565
565
},
566
566
Options : []cmdkit.Option {
567
- cmdkit .IntOption (filesOffsetOptionName , "o" , "Byte offset to begin reading from." ),
568
- cmdkit .IntOption (filesCountOptionName , "n" , "Maximum number of bytes to read." ),
567
+ cmdkit .Int64Option (filesOffsetOptionName , "o" , "Byte offset to begin reading from." ),
568
+ cmdkit .Int64Option (filesCountOptionName , "n" , "Maximum number of bytes to read." ),
569
569
},
570
570
Run : func (req oldcmds.Request , res oldcmds.Response ) {
571
571
n , err := req .InvocContext ().GetNode ()
@@ -600,7 +600,7 @@ Examples:
600
600
601
601
defer rfd .Close ()
602
602
603
- offset , _ , err := req .Option (offsetOptionName ).Int ()
603
+ offset , _ , err := req .Option (offsetOptionName ).Int64 ()
604
604
if err != nil {
605
605
res .SetError (err , cmdkit .ErrNormal )
606
606
return
@@ -628,7 +628,7 @@ Examples:
628
628
}
629
629
630
630
var r io.Reader = & contextReaderWrapper {R : rfd , ctx : req .Context ()}
631
- count , found , err := req .Option (filesCountOptionName ).Int ()
631
+ count , found , err := req .Option (filesCountOptionName ).Int64 ()
632
632
if err != nil {
633
633
res .SetError (err , cmdkit .ErrNormal )
634
634
return
@@ -750,11 +750,11 @@ stat' on the file or any of its ancestors.
750
750
cmdkit .FileArg ("data" , true , false , "Data to write." ).EnableStdin (),
751
751
},
752
752
Options : []cmdkit.Option {
753
- cmdkit .IntOption (filesOffsetOptionName , "o" , "Byte offset to begin writing at." ),
753
+ cmdkit .Int64Option (filesOffsetOptionName , "o" , "Byte offset to begin writing at." ),
754
754
cmdkit .BoolOption (filesCreateOptionName , "e" , "Create the file if it does not exist." ),
755
755
cmdkit .BoolOption (filesParentsOptionName , "p" , "Make parent directories as needed." ),
756
756
cmdkit .BoolOption (filesTruncateOptionName , "t" , "Truncate the file to size zero before writing." ),
757
- cmdkit .IntOption (filesCountOptionName , "n" , "Maximum number of bytes to read." ),
757
+ cmdkit .Int64Option (filesCountOptionName , "n" , "Maximum number of bytes to read." ),
758
758
cmdkit .BoolOption (filesRawLeavesOptionName , "Use raw blocks for newly created leaf nodes. (experimental)" ),
759
759
cidVersionOption ,
760
760
hashOption ,
@@ -781,7 +781,7 @@ stat' on the file or any of its ancestors.
781
781
return err
782
782
}
783
783
784
- offset , _ := req .Options [filesOffsetOptionName ].(int )
784
+ offset , _ := req .Options [filesOffsetOptionName ].(int64 )
785
785
if offset < 0 {
786
786
return fmt .Errorf ("cannot have negative write offset" )
787
787
}
@@ -823,7 +823,7 @@ stat' on the file or any of its ancestors.
823
823
}
824
824
}
825
825
826
- count , countfound := req .Options [filesCountOptionName ].(int )
826
+ count , countfound := req .Options [filesCountOptionName ].(int64 )
827
827
if countfound && count < 0 {
828
828
return fmt .Errorf ("cannot have negative byte count" )
829
829
}
0 commit comments