Skip to content

Commit

Permalink
Lint fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoon Prins committed Sep 8, 2021
1 parent 32fbbc3 commit 0ee5178
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 71 deletions.
6 changes: 3 additions & 3 deletions cmd/reva/transfer-cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func transferCancelCommand() *command {
cmd := newCommand("transfer-cancel")
cmd.Description = func() string { return "cancel a running transfer" }
cmd.Usage = func() string { return "Usage: transfer-cancel [-flags]" }
txId := cmd.String("txId", "", "the transfer identifier")
txID := cmd.String("txId", "", "the transfer identifier")

cmd.Action = func(w ...io.Writer) error {
// validate flags
if *txId == "" {
if *txID == "" {
return errors.New("txId must be specified: use -txId flag\n" + cmd.Usage())
}

Expand All @@ -49,7 +49,7 @@ func transferCancelCommand() *command {
}

cancelRequest := &datatx.CancelTransferRequest{
TxId: &datatx.TxId{OpaqueId: *txId},
TxId: &datatx.TxId{OpaqueId: *txID},
}

cancelResponse, err := client.CancelTransfer(ctx, cancelRequest)
Expand Down
6 changes: 3 additions & 3 deletions cmd/reva/transfer-get-status.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func transferGetStatusCommand() *command {
cmd := newCommand("transfer-get-status")
cmd.Description = func() string { return "get the status of a transfer" }
cmd.Usage = func() string { return "Usage: transfer-get-status [-flags]" }
txId := cmd.String("txId", "", "the transfer identifier")
txID := cmd.String("txId", "", "the transfer identifier")

cmd.Action = func(w ...io.Writer) error {
// validate flags
if *txId == "" {
if *txID == "" {
return errors.New("txId must be specified: use -txId flag\n" + cmd.Usage())
}

Expand All @@ -49,7 +49,7 @@ func transferGetStatusCommand() *command {
}

getStatusRequest := &datatx.GetTransferStatusRequest{
TxId: &datatx.TxId{OpaqueId: *txId},
TxId: &datatx.TxId{OpaqueId: *txID},
}

getStatusResponse, err := client.GetTransferStatus(ctx, getStatusRequest)
Expand Down
6 changes: 3 additions & 3 deletions cmd/reva/transfer-list.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func transferListCommand() *command {
cmd := newCommand("transfer-list")
cmd.Description = func() string { return "get a list of transfers" }
cmd.Usage = func() string { return "Usage: transfer-list [-flags]" }
filterShareId := cmd.String("shareId", "", "share ID filter (optional)")
filterShareID := cmd.String("shareId", "", "share ID filter (optional)")

cmd.Action = func(w ...io.Writer) error {
ctx := getAuthContext()
Expand All @@ -44,12 +44,12 @@ func transferListCommand() *command {

// validate flags
var filters []*datatx.ListTransfersRequest_Filter
if *filterShareId != "" {
if *filterShareID != "" {
filters = append(filters, &datatx.ListTransfersRequest_Filter{
Type: datatx.ListTransfersRequest_Filter_TYPE_SHARE_ID,
Term: &datatx.ListTransfersRequest_Filter_ShareId{
ShareId: &ocm.ShareId{
OpaqueId: *filterShareId,
OpaqueId: *filterShareID,
},
},
})
Expand Down
6 changes: 3 additions & 3 deletions cmd/reva/transfer-retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func transferRetryCommand() *command {
cmd := newCommand("transfer-retry")
cmd.Description = func() string { return "retry a transfer" }
cmd.Usage = func() string { return "Usage: transfer-retry [-flags]" }
txId := cmd.String("txId", "", "the transfer identifier")
txID := cmd.String("txId", "", "the transfer identifier")

cmd.Action = func(w ...io.Writer) error {
// validate flags
if *txId == "" {
if *txID == "" {
return errors.New("txId must be specified: use -txId flag\n" + cmd.Usage())
}

Expand All @@ -50,7 +50,7 @@ func transferRetryCommand() *command {

retryRequest := &datatx.RetryTransferRequest{
TxId: &datatx.TxId{
OpaqueId: *txId,
OpaqueId: *txID,
},
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/datatx/datatx.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ type Manager interface {
// StartTransfer initiates a transfer job and returns a TxInfo object including a unique transfer id, and error if any.
StartTransfer(ctx context.Context, srcRemote string, srcPath string, srcToken string, destRemote string, destPath string, destToken string) (*datatx.TxInfo, error)
// GetTransferStatus returns a TxInfo object including the current status, and error if any.
GetTransferStatus(ctx context.Context, transferId string) (*datatx.TxInfo, error)
GetTransferStatus(ctx context.Context, transferID string) (*datatx.TxInfo, error)
// CancelTransfer cancels the transfer and returns a TxInfo object and error if any.
CancelTransfer(ctx context.Context, transferId string) (*datatx.TxInfo, error)
CancelTransfer(ctx context.Context, transferID string) (*datatx.TxInfo, error)
// RetryTransfer retries the transfer and returns a TxInfo object and error if any.
// Note that tokens must still be valid.
RetryTransfer(ctx context.Context, transferId string) (*datatx.TxInfo, error)
RetryTransfer(ctx context.Context, transferID string) (*datatx.TxInfo, error)
}
Loading

0 comments on commit 0ee5178

Please sign in to comment.