aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGagziW <leon.stanko@rwth-aachen.de>2018-05-03 16:30:12 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-03 16:30:12 +0800
commitea1724de1a158968aec732a557d3d688c4799887 (patch)
treebb317d443335a1d6f9c77acfabd0d51d0952dc22
parent577d375a0df08710e52b1c38720f98a7f25d206a (diff)
downloaddexon-ea1724de1a158968aec732a557d3d688c4799887.tar
dexon-ea1724de1a158968aec732a557d3d688c4799887.tar.gz
dexon-ea1724de1a158968aec732a557d3d688c4799887.tar.bz2
dexon-ea1724de1a158968aec732a557d3d688c4799887.tar.lz
dexon-ea1724de1a158968aec732a557d3d688c4799887.tar.xz
dexon-ea1724de1a158968aec732a557d3d688c4799887.tar.zst
dexon-ea1724de1a158968aec732a557d3d688c4799887.zip
log: changed if-else blocks to conform with golint (#16661)
-rw-r--r--log/handler.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/log/handler.go b/log/handler.go
index d5594b853..41d5718dd 100644
--- a/log/handler.go
+++ b/log/handler.go
@@ -234,9 +234,8 @@ func FailoverHandler(hs ...Handler) Handler {
err = h.Log(r)
if err == nil {
return nil
- } else {
- r.Ctx = append(r.Ctx, fmt.Sprintf("failover_err_%d", i), err)
}
+ r.Ctx = append(r.Ctx, fmt.Sprintf("failover_err_%d", i), err)
}
return err
@@ -320,13 +319,12 @@ func evaluateLazy(lz Lazy) (interface{}, error) {
results := value.Call([]reflect.Value{})
if len(results) == 1 {
return results[0].Interface(), nil
- } else {
- values := make([]interface{}, len(results))
- for i, v := range results {
- values[i] = v.Interface()
- }
- return values, nil
}
+ values := make([]interface{}, len(results))
+ for i, v := range results {
+ values[i] = v.Interface()
+ }
+ return values, nil
}
// DiscardHandler reports success for all writes but does nothing.