diff options
| author | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2009-11-06 14:24:38 -0800 |
| commit | 828334dd95ce8e4bf3662bd5c89d7c417f0741d0 (patch) | |
| tree | fd7e0c9961bc3af2ddf105e9cc1943f2509ac584 /src/pkg/encoding/ascii85/ascii85.go | |
| parent | eb5cdfd67ff6d32df4c4c27840eaee027c5e3512 (diff) | |
| download | golang-828334dd95ce8e4bf3662bd5c89d7c417f0741d0.tar.gz | |
- fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
Diffstat (limited to 'src/pkg/encoding/ascii85/ascii85.go')
| -rw-r--r-- | src/pkg/encoding/ascii85/ascii85.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/pkg/encoding/ascii85/ascii85.go b/src/pkg/encoding/ascii85/ascii85.go index adf1fe7dd..a1d9f7a7a 100644 --- a/src/pkg/encoding/ascii85/ascii85.go +++ b/src/pkg/encoding/ascii85/ascii85.go @@ -84,18 +84,14 @@ func Encode(dst, src []byte) int { } // MaxEncodedLen returns the maximum length of an encoding of n source bytes. -func MaxEncodedLen(n int) int { - return (n+3)/4*5; -} +func MaxEncodedLen(n int) int { return (n+3)/4*5 } // NewEncoder returns a new ascii85 stream encoder. Data written to // the returned writer will be encoded and then written to w. // Ascii85 encodings operate in 32-bit blocks; when finished // writing, the caller must Close the returned encoder to flush any // trailing partial block. -func NewEncoder(w io.Writer) io.WriteCloser { - return &encoder{w: w}; -} +func NewEncoder(w io.Writer) io.WriteCloser { return &encoder{w: w} } type encoder struct { err os.Error; @@ -248,9 +244,7 @@ func Decode(dst, src []byte, flush bool) (ndst, nsrc int, err os.Error) { } // NewDecoder constructs a new ascii85 stream decoder. -func NewDecoder(r io.Reader) io.Reader { - return &decoder{r: r}; -} +func NewDecoder(r io.Reader) io.Reader { return &decoder{r: r} } type decoder struct { err os.Error; |
