Skip to content

Commit

Permalink
Remove unnecessary break on switch case
Browse files Browse the repository at this point in the history
  • Loading branch information
albertusdev committed Jul 22, 2019
1 parent df6feb0 commit 7629016
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions pkg/metrics/statsd_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,10 @@ func Update(updateOption UpdateOption) {
switch updateOption.Type {
case Duration:
err = instance.client.TimingDuration(formatter(updateOption), updateOption.Duration, instance.sampleRate)
break
case Gauge:
err = instance.client.Gauge(formatter(updateOption), int64(updateOption.NumValue), instance.sampleRate)
break
case Count:
err = instance.client.Inc(formatter(updateOption), 1, instance.sampleRate)
break
}
if err != nil {
logger.Errorf("metrics.Update got an error: %s", err)
Expand Down
10 changes: 0 additions & 10 deletions pkg/processor/native/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,24 @@ func getStartingPointForCrop(w, h, rw, rh int, cropPoint processor.CropPoint) (i
switch cropPoint {
case processor.CropTop:
y = 0
break
case processor.CropTopLeft:
x = 0
y = 0
break
case processor.CropTopRight:
x = w - rw
y = 0
break
case processor.CropLeft:
x = 0
break
case processor.CropRight:
x = w - rw
break
case processor.CropBottom:
y = h - rh
break
case processor.CropBottomLeft:
x = 0
y = h - rh
break
case processor.CropBottomRight:
x = w - rw
y = h - rh
break
default:
break
}
return x, y
}

0 comments on commit 7629016

Please sign in to comment.