all: simplify switches (#17267)

* all: simplify switches

* silly mistake
This commit is contained in:
Oleg Kovalov
2018-07-30 11:30:09 +02:00
committed by Péter Szilágyi
parent 273c7a9dc4
commit d42ce0f2c1
10 changed files with 20 additions and 34 deletions

View File

@ -486,12 +486,7 @@ func (jst *Tracer) call(method string, args ...string) (json.RawMessage, error)
}
func wrapError(context string, err error) error {
var message string
switch err := err.(type) {
default:
message = err.Error()
}
return fmt.Errorf("%v in server-side tracer function '%v'", message, context)
return fmt.Errorf("%v in server-side tracer function '%v'", err, context)
}
// CaptureStart implements the Tracer interface to initialize the tracing operation.