diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/json/indent.go | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/json/indent.go')
-rw-r--r-- | libgo/go/json/indent.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libgo/go/json/indent.go b/libgo/go/json/indent.go index 2a75303..5ba19b0 100644 --- a/libgo/go/json/indent.go +++ b/libgo/go/json/indent.go @@ -4,14 +4,11 @@ package json -import ( - "bytes" - "os" -) +import "bytes" // Compact appends to dst the JSON-encoded src with // insignificant space characters elided. -func Compact(dst *bytes.Buffer, src []byte) os.Error { +func Compact(dst *bytes.Buffer, src []byte) error { origLen := dst.Len() var scan scanner scan.reset() @@ -52,7 +49,7 @@ func newline(dst *bytes.Buffer, prefix, indent string, depth int) { // copies of indent according to the indentation nesting. // The data appended to dst has no trailing newline, to make it easier // to embed inside other formatted JSON data. -func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) os.Error { +func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error { origLen := dst.Len() var scan scanner scan.reset() |