Simplify conditional by removing unnecessary 'else' statement (#13)

This commit is contained in:
Gustavo Pantuza 2019-07-01 18:20:29 -03:00 committed by Andriy Knysh
parent 7813b25715
commit 79d24a0032

View File

@ -173,10 +173,10 @@ func (b *Bridge) Run(ctx context.Context) {
count, err := b.publishMetricsToCloudWatch(metricFamilies)
if err != nil {
log.Println("prometheus-to-cloudwatch: error publishing to CloudWatch:", err)
} else {
log.Println(fmt.Sprintf("prometheus-to-cloudwatch: published %d metrics to CloudWatch", count))
}
log.Println(fmt.Sprintf("prometheus-to-cloudwatch: published %d metrics to CloudWatch", count))
case <-ctx.Done():
log.Println("prometheus-to-cloudwatch: stopping")
return