Rename a struct private var to golang convention
@@ -33,7 +33,7 @@ type Processor struct {
graceful chan struct{}
terminate gocontext.CancelFunc
- shutdown_at time.Time
+ shutdownAt time.Time
// ProcessedCount contains the number of jobs that has been processed
// by this Processor. This value should not be modified outside of the
@@ -118,7 +118,7 @@ func (p *Processor) Run() {
logger.Info("processor is done, terminating")
return
case <-p.graceful:
- logger.WithField("shutdown_duration_s", time.Since(p.shutdown_at).Seconds()).Info("processor is done, terminating")
+ logger.WithField("shutdown_duration_s", time.Since(p.shutdownAt).Seconds()).Info("processor is done, terminating")
p.terminate()
return
default:
@@ -129,7 +129,7 @@ func (p *Processor) Run() {
logger.Info("processor is done, terminating")
return
case <-p.graceful:
- logger.WithField("shutdown_duration_s", time.Since(p.shutdown_at).Seconds()).Info("processor is done, terminating")
+ logger.WithField("shutdown_duration_s", time.Since(p.shutdownAt).Seconds()).Info("processor is done, terminating")
p.terminate()
return
case buildJob, ok := <-p.buildJobsChan:
@@ -194,7 +194,7 @@ func (p *Processor) GracefulShutdown() {
}
}()
logger.Info("processor initiating graceful shutdown")
- p.shutdown_at = time.Now()
+ p.shutdownAt = time.Now()
tryClose(p.graceful)
}
