@@ -3,7 +3,6 @@ package commands
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
- "io/ioutil"
7
6
"os"
8
7
"strconv"
9
8
"strings"
@@ -283,11 +282,11 @@ func obtainMTCmd(context *cli.Context) error {
283
282
opts .Capabilities = api .NewCapabilities (config .Get ().DefaultTokenCapabilities .Returned )
284
283
}
285
284
286
- st , err := obtainMT (opts , context , mtCommand .Tag , mtCommand .TokenType )
285
+ st , err := obtainMT (& opts , context , mtCommand .Tag , mtCommand .TokenType )
287
286
if err != nil {
288
287
return err
289
288
}
290
- return ioutil .WriteFile (mtCommand .Out , append ([]byte (st ), '\n' ), 0600 )
289
+ return os .WriteFile (mtCommand .Out , append ([]byte (st ), '\n' ), 0600 )
291
290
}
292
291
293
292
func parseRestrictionOpts (opts * restrictionOpts , ctx * cli.Context ) (r api.Restrictions , err error ) {
@@ -325,7 +324,7 @@ func parseRestrictionOpts(opts *restrictionOpts, ctx *cli.Context) (r api.Restri
325
324
return
326
325
}
327
326
328
- func obtainMT (opts commonMTOpts , context * cli.Context , name , responseType string ) (string , error ) {
327
+ func obtainMT (opts * commonMTOpts , context * cli.Context , name , responseType string ) (string , error ) {
329
328
mytoken := config .Get ().Mytoken
330
329
if opts .TransferCode != "" {
331
330
return mytoken .Mytoken .FromTransferCode (opts .TransferCode )
@@ -443,7 +442,7 @@ func storeMTCmd(context *cli.Context) error {
443
442
os .Exit (1 )
444
443
}
445
444
}
446
- mt , err := obtainMT (opts , context , storeName , api .ResponseTypeToken )
445
+ mt , err := obtainMT (& opts , context , storeName , api .ResponseTypeToken )
447
446
if err != nil {
448
447
return err
449
448
}
@@ -488,7 +487,7 @@ func parseRestrictionOption(arg string) (api.Restrictions, error) {
488
487
if arg [0 ] == '[' || arg [0 ] == '{' {
489
488
return parseRestrictions (arg )
490
489
}
491
- data , err := ioutil .ReadFile (arg )
490
+ data , err := os .ReadFile (arg )
492
491
if err != nil {
493
492
return nil , err
494
493
}
0 commit comments