Change string formatting
This commit is contained in:
parent
437e052bbb
commit
687af1f3d4
@ -48,14 +48,13 @@ func attributesString(summary *ContractSummary) string {
|
||||
func formatAttribute(attributeName string, summary *ContractSummary) string {
|
||||
var stringResult string
|
||||
result := summary.GetStateAttribute(attributeName)
|
||||
fmt.Println(fmt.Sprintf("%s: %v (%T)", attributeName, result, result))
|
||||
switch t := result.(type) {
|
||||
case common.Address:
|
||||
ca := result.(common.Address)
|
||||
stringResult = fmt.Sprintf("%v", ca.Hex())
|
||||
stringResult = fmt.Sprintf("%s: %v", attributeName, ca.Hex())
|
||||
default:
|
||||
_ = t
|
||||
stringResult = fmt.Sprintf("%v", result)
|
||||
stringResult = fmt.Sprintf("%s: %v", attributeName, result)
|
||||
}
|
||||
return stringResult
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user