fix improper spelling

Signed-off-by: shaobo <shaobo@caicloud.io>
This commit is contained in:
shaobo 2021-01-08 16:25:34 +08:00
parent 39fb500318
commit fba0ff4d83

View File

@ -62,13 +62,13 @@ var JobService = &Bootstrap{}
// Bootstrap is coordinating process to help load and start the other components to serve.
type Bootstrap struct {
jobConextInitializer job.ContextInitializer
jobContextInitializer job.ContextInitializer
}
// SetJobContextInitializer set the job context initializer
func (bs *Bootstrap) SetJobContextInitializer(initializer job.ContextInitializer) {
if initializer != nil {
bs.jobConextInitializer = initializer
bs.jobContextInitializer = initializer
}
}
@ -82,8 +82,8 @@ func (bs *Bootstrap) LoadAndRun(ctx context.Context, cancel context.CancelFunc)
}
// Build specified job context
if bs.jobConextInitializer != nil {
rootContext.JobContext, err = bs.jobConextInitializer(ctx)
if bs.jobContextInitializer != nil {
rootContext.JobContext, err = bs.jobContextInitializer(ctx)
if err != nil {
return errors.Errorf("initialize job context error: %s", err)
}