mirror of
https://github.com/golang/go
synced 2024-11-12 04:00:23 -07:00
runtime: fix string formatting
Change-Id: I87d0bc78a246e479d97b3f83cf77c1f701975413
GitHub-Last-Rev: 22cd684e08
GitHub-Pull-Request: golang/go#29157
Reviewed-on: https://go-review.googlesource.com/c/153298
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
04eda1a94d
commit
8962b71c49
@ -353,7 +353,8 @@ class IfacePrinter:
|
|||||||
return "<bad dynamic type>"
|
return "<bad dynamic type>"
|
||||||
|
|
||||||
if dtype is None: # trouble looking up, print something reasonable
|
if dtype is None: # trouble looking up, print something reasonable
|
||||||
return "({0}){0}".format(iface_dtype_name(self.val), self.val['data'])
|
return "({typename}){data}".format(
|
||||||
|
typename=iface_dtype_name(self.val), data=self.val['data'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.val['data'].cast(dtype).dereference()
|
return self.val['data'].cast(dtype).dereference()
|
||||||
|
Loading…
Reference in New Issue
Block a user