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

@@ -43,11 +43,11 @@ type decodedCallData struct {
// String implements stringer interface, tries to use the underlying value-type
func (arg decodedArgument) String() string {
var value string
switch arg.value.(type) {
switch val := arg.value.(type) {
case fmt.Stringer:
value = arg.value.(fmt.Stringer).String()
value = val.String()
default:
value = fmt.Sprintf("%v", arg.value)
value = fmt.Sprintf("%v", val)
}
return fmt.Sprintf("%v: %v", arg.soltype.Type.String(), value)
}