44 "bytes"
55 "fmt"
66 "io"
7- "io/ioutil "
7+ "os "
88 "reflect"
99 "strings"
1010
@@ -27,13 +27,13 @@ func loadArgsFileContent(cmd *Command, cmdArgs interface{}) error {
2727 for _ , v := range fieldValues {
2828 switch i := v .Interface ().(type ) {
2929 case io.Reader :
30- b , err := ioutil .ReadAll (i )
30+ b , err := io .ReadAll (i )
3131 if err != nil {
3232 return fmt .Errorf ("could not read argument: %s" , err )
3333 }
3434
3535 if strings .HasPrefix (string (b ), "@" ) {
36- content , err := ioutil .ReadFile (string (b )[1 :])
36+ content , err := os .ReadFile (string (b )[1 :])
3737 if err != nil {
3838 return fmt .Errorf ("could not open requested file: %s" , err )
3939 }
@@ -42,15 +42,15 @@ func loadArgsFileContent(cmd *Command, cmdArgs interface{}) error {
4242 }
4343 case * string :
4444 if strings .HasPrefix (* i , "@" ) {
45- content , err := ioutil .ReadFile ((* i )[1 :])
45+ content , err := os .ReadFile ((* i )[1 :])
4646 if err != nil {
4747 return fmt .Errorf ("could not open requested file: %s" , err )
4848 }
4949 v .SetString (string (content ))
5050 }
5151 case string :
5252 if strings .HasPrefix (i , "@" ) {
53- content , err := ioutil .ReadFile (i [1 :])
53+ content , err := os .ReadFile (i [1 :])
5454 if err != nil {
5555 return fmt .Errorf ("could not open requested file: %s" , err )
5656 }
0 commit comments