Skip to content

Commit 8b936d5

Browse files
committed
chore: fix some typos in comment
Signed-off-by: hustrust <[email protected]>
1 parent 90d4c2a commit 8b936d5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

api/grpcserver_integrity_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ var (
9898
big.NewInt(testutil.TestGasPriceInt64))
9999
_testTransferInvalid6Pb = _testTransferInvalid6.Proto()
100100

101-
// negative transfer amout
101+
// negative transfer amount
102102
_testTransferInvalid7, _ = action.SignedTransfer(identityset.Address(28).String(),
103103
identityset.PrivateKey(28), 3, big.NewInt(-10), []byte{}, 10000,
104104
big.NewInt(testutil.TestGasPriceInt64))
@@ -2634,7 +2634,7 @@ func TestGrpcServer_TraceTransactionStructLogsIntegrity(t *testing.T) {
26342634
_, err = grpcHandler.TraceTransactionStructLogs(context.Background(), request)
26352635
require.Error(err)
26362636

2637-
//unsupport type
2637+
// unsupported type
26382638
request.ActionHash = hex.EncodeToString(_transferHash1[:])
26392639
_, err = grpcHandler.TraceTransactionStructLogs(context.Background(), request)
26402640
require.Error(err)

pkg/lifecycle/lifecycle.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (lc *Lifecycle) Add(m Model) { lc.models = append(lc.models, m) }
4646
// AddModels adds multiple models into LifeCycle.
4747
func (lc *Lifecycle) AddModels(m ...Model) { lc.models = append(lc.models, m...) }
4848

49-
// OnStart runs models OnStart function if models implmented it. All OnStart functions will be run in parallel.
49+
// OnStart runs models OnStart function if models implemented it. All OnStart functions will be run in parallel.
5050
// context passed into models' OnStart method will be canceled on the first time a model's OnStart function return non-nil error.
5151
func (lc *Lifecycle) OnStart(ctx context.Context) error {
5252
g, ctx := errgroup.WithContext(ctx)
@@ -58,7 +58,7 @@ func (lc *Lifecycle) OnStart(ctx context.Context) error {
5858
return g.Wait()
5959
}
6060

61-
// OnStop runs models Stop function if models implmented it. All OnStop functions will be run in parallel.
61+
// OnStop runs models Stop function if models implemented it. All OnStop functions will be run in parallel.
6262
// context passed into models' OnStop method will be canceled on the first time a model's OnStop function return non-nil error.
6363
func (lc *Lifecycle) OnStop(ctx context.Context) error {
6464
g, ctx := errgroup.WithContext(ctx)
@@ -70,7 +70,7 @@ func (lc *Lifecycle) OnStop(ctx context.Context) error {
7070
return g.Wait()
7171
}
7272

73-
// OnStartSequentially runs models' Start function if models implmented it.
73+
// OnStartSequentially runs models' Start function if models implemented it.
7474
func (lc *Lifecycle) OnStartSequentially(ctx context.Context) error {
7575
for _, m := range lc.models {
7676
if starter, ok := m.(Starter); ok {
@@ -82,7 +82,7 @@ func (lc *Lifecycle) OnStartSequentially(ctx context.Context) error {
8282
return nil
8383
}
8484

85-
// OnStopSequentially runs models' Stop function if models implmented it.
85+
// OnStopSequentially runs models' Stop function if models implemented it.
8686
func (lc *Lifecycle) OnStopSequentially(ctx context.Context) error {
8787
for i := len(lc.models) - 1; i >= 0; i-- {
8888
if stopper, ok := lc.models[i].(Stopper); ok {

pkg/recovery/recovery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type (
4747
// _crashlogDir saves the directory of crashlog
4848
var _crashlogDir string = "/"
4949

50-
// Recover catchs the crashing goroutine
50+
// Recover catches the crashing goroutine
5151
func Recover() {
5252
if r := recover(); r != nil {
5353
LogCrash(r)

0 commit comments

Comments
 (0)