diff --git a/api/grpcserver_integrity_test.go b/api/grpcserver_integrity_test.go index 2d594c4ef0..95172b791c 100644 --- a/api/grpcserver_integrity_test.go +++ b/api/grpcserver_integrity_test.go @@ -98,7 +98,7 @@ var ( big.NewInt(testutil.TestGasPriceInt64)) _testTransferInvalid6Pb = _testTransferInvalid6.Proto() - // negative transfer amout + // negative transfer amount _testTransferInvalid7, _ = action.SignedTransfer(identityset.Address(28).String(), identityset.PrivateKey(28), 3, big.NewInt(-10), []byte{}, 10000, big.NewInt(testutil.TestGasPriceInt64)) @@ -2634,7 +2634,7 @@ func TestGrpcServer_TraceTransactionStructLogsIntegrity(t *testing.T) { _, err = grpcHandler.TraceTransactionStructLogs(context.Background(), request) require.Error(err) - //unsupport type + // unsupported type request.ActionHash = hex.EncodeToString(_transferHash1[:]) _, err = grpcHandler.TraceTransactionStructLogs(context.Background(), request) require.Error(err) diff --git a/pkg/lifecycle/lifecycle.go b/pkg/lifecycle/lifecycle.go index 9db1350cd9..f1301cae71 100644 --- a/pkg/lifecycle/lifecycle.go +++ b/pkg/lifecycle/lifecycle.go @@ -46,7 +46,7 @@ func (lc *Lifecycle) Add(m Model) { lc.models = append(lc.models, m) } // AddModels adds multiple models into LifeCycle. func (lc *Lifecycle) AddModels(m ...Model) { lc.models = append(lc.models, m...) } -// OnStart runs models OnStart function if models implmented it. All OnStart functions will be run in parallel. +// OnStart runs models OnStart function if models implemented it. All OnStart functions will be run in parallel. // context passed into models' OnStart method will be canceled on the first time a model's OnStart function return non-nil error. func (lc *Lifecycle) OnStart(ctx context.Context) error { g, ctx := errgroup.WithContext(ctx) @@ -58,7 +58,7 @@ func (lc *Lifecycle) OnStart(ctx context.Context) error { return g.Wait() } -// OnStop runs models Stop function if models implmented it. All OnStop functions will be run in parallel. +// OnStop runs models Stop function if models implemented it. All OnStop functions will be run in parallel. // context passed into models' OnStop method will be canceled on the first time a model's OnStop function return non-nil error. func (lc *Lifecycle) OnStop(ctx context.Context) error { g, ctx := errgroup.WithContext(ctx) @@ -70,7 +70,7 @@ func (lc *Lifecycle) OnStop(ctx context.Context) error { return g.Wait() } -// OnStartSequentially runs models' Start function if models implmented it. +// OnStartSequentially runs models' Start function if models implemented it. func (lc *Lifecycle) OnStartSequentially(ctx context.Context) error { for _, m := range lc.models { if starter, ok := m.(Starter); ok { @@ -82,7 +82,7 @@ func (lc *Lifecycle) OnStartSequentially(ctx context.Context) error { return nil } -// OnStopSequentially runs models' Stop function if models implmented it. +// OnStopSequentially runs models' Stop function if models implemented it. func (lc *Lifecycle) OnStopSequentially(ctx context.Context) error { for i := len(lc.models) - 1; i >= 0; i-- { if stopper, ok := lc.models[i].(Stopper); ok { diff --git a/pkg/recovery/recovery.go b/pkg/recovery/recovery.go index 8afbba2967..4ff0a6babe 100644 --- a/pkg/recovery/recovery.go +++ b/pkg/recovery/recovery.go @@ -47,7 +47,7 @@ type ( // _crashlogDir saves the directory of crashlog var _crashlogDir string = "/" -// Recover catchs the crashing goroutine +// Recover catches the crashing goroutine func Recover() { if r := recover(); r != nil { LogCrash(r)