@@ -46,7 +46,7 @@ func (lc *Lifecycle) Add(m Model) { lc.models = append(lc.models, m) }
4646// AddModels adds multiple models into LifeCycle.
4747func (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.
5151func (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.
6363func (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.
7474func (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.
8686func (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 {
0 commit comments