From 8ac495723e9bd716c9edf7c288233c3e89b6d84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 11 Nov 2020 17:39:31 +0100 Subject: [PATCH] gofmt --- api/apistruct/struct.go | 4 ++-- cmd/lotus-storage-miner/sealing.go | 7 ++++--- extern/sector-storage/manager.go | 7 +++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 16e93be5e..08b3ba9a9 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -323,8 +323,8 @@ type StorageMinerStruct struct { ReturnReadPiece func(ctx context.Context, callID storiface.CallID, ok bool, err string) error `perm:"admin" retry:"true"` ReturnFetch func(ctx context.Context, callID storiface.CallID, err string) error `perm:"admin" retry:"true"` - SealingSchedDiag func(context.Context, bool) (interface{}, error) `perm:"admin"` - SealingAbort func(ctx context.Context, call storiface.CallID) error `perm:"admin"` + SealingSchedDiag func(context.Context, bool) (interface{}, error) `perm:"admin"` + SealingAbort func(ctx context.Context, call storiface.CallID) error `perm:"admin"` StorageList func(context.Context) (map[stores.ID][]stores.Decl, error) `perm:"admin"` StorageLocal func(context.Context) (map[stores.ID]string, error) `perm:"admin"` diff --git a/cmd/lotus-storage-miner/sealing.go b/cmd/lotus-storage-miner/sealing.go index 6d972a11c..89af1ba9d 100644 --- a/cmd/lotus-storage-miner/sealing.go +++ b/cmd/lotus-storage-miner/sealing.go @@ -129,7 +129,7 @@ var sealingJobsCmd = &cli.Command{ Flags: []cli.Flag{ &cli.BoolFlag{Name: "color"}, &cli.BoolFlag{ - Name: "show-ret-done", + Name: "show-ret-done", Usage: "show returned but not consumed calls", }, }, @@ -263,8 +263,8 @@ var sealingSchedDiagCmd = &cli.Command{ } var sealingAbortCmd = &cli.Command{ - Name: "abort", - Usage: "Abort a running job", + Name: "abort", + Usage: "Abort a running job", ArgsUsage: "[call id]", Action: func(cctx *cli.Context) error { if cctx.Args().Len() != 1 { @@ -289,6 +289,7 @@ var sealingAbortCmd = &cli.Command{ for _, workerJobs := range jobs { for _, j := range workerJobs { if strings.HasPrefix(j.ID.ID.String(), cctx.Args().First()) { + j := j job = &j break outer } diff --git a/extern/sector-storage/manager.go b/extern/sector-storage/manager.go index 8e7d8c4e8..a3d6a4131 100644 --- a/extern/sector-storage/manager.go +++ b/extern/sector-storage/manager.go @@ -700,22 +700,21 @@ func (m *Manager) SchedDiag(ctx context.Context, doSched bool) (interface{}, err } } - si, err := m.sched.Info(ctx) + si, err := m.sched.Info(ctx) if err != nil { return nil, err } type SchedInfo interface{} - i := struct{ + i := struct { SchedInfo ReturnedWork []string - Waiting []string + Waiting []string CallToWork map[string]string EarlyRet []string - }{ SchedInfo: si,