mirror of
https://github.com/golang/go
synced 2024-11-22 00:14:42 -07:00
remove explicit import of "sys"
add a boolean printer SVN=124362
This commit is contained in:
parent
90846cd447
commit
362ea7c77d
@ -11,7 +11,7 @@ package fmt
|
||||
f.ud(^0).putnl(); // print string with automatic newline
|
||||
*/
|
||||
|
||||
import sys "sys"
|
||||
// import sys "sys"
|
||||
|
||||
export Fmt, New;
|
||||
|
||||
@ -144,6 +144,17 @@ func putint(buf *[64]byte, i int, base, val uint64, digits *string) int {
|
||||
return i-1;
|
||||
}
|
||||
|
||||
// boolean
|
||||
func (f *Fmt) boolean(a bool) *Fmt {
|
||||
if a {
|
||||
f.pad("true");
|
||||
} else {
|
||||
f.pad("false");
|
||||
}
|
||||
f.clearflags();
|
||||
return f;
|
||||
}
|
||||
|
||||
// integer; interprets prec but not wid.
|
||||
func (f *Fmt) integer(a int64, base uint, is_signed bool, digits *string) string {
|
||||
var buf [64]byte;
|
||||
|
Loading…
Reference in New Issue
Block a user