[#278] cli: Support request X-Headers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e53bf574b5
commit
51b85b0a73
5 changed files with 105 additions and 45 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"math"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/accounting"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -42,14 +41,14 @@ var accountingBalanceCmd = &cobra.Command{
|
|||
|
||||
switch balanceOwner {
|
||||
case "":
|
||||
response, err = cli.GetSelfBalance(ctx, client.WithTTL(getTTL()))
|
||||
response, err = cli.GetSelfBalance(ctx, globalCallOptions()...)
|
||||
default:
|
||||
oid, err = ownerFromString(balanceOwner)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
response, err = cli.GetBalance(ctx, oid, client.WithTTL(getTTL()))
|
||||
response, err = cli.GetBalance(ctx, oid, globalCallOptions()...)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue