mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Add support for the basic type "bool".
R=r DELTA=51 (51 added, 0 deleted, 0 changed) OCL=18283 CL=18290
This commit is contained in:
parent
613a5c8bc6
commit
16fd356679
6 changed files with 51 additions and 0 deletions
|
|
@ -162,6 +162,12 @@ func ValueToString(val Value) string {
|
|||
return "float80";
|
||||
case StringKind:
|
||||
return val.(StringValue).Get();
|
||||
case BoolKind:
|
||||
if val.(BoolValue).Get() {
|
||||
return "true"
|
||||
} else {
|
||||
return "false"
|
||||
}
|
||||
case PtrKind:
|
||||
v := val.(PtrValue);
|
||||
return TypeToString(typ, false) + "(" + integer(int64(v.Get())) + ")";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue