diff options
| author | Robert Griesemer <gri@golang.org> | 2009-12-15 15:27:16 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2009-12-15 15:27:16 -0800 |
| commit | 881d6064d23d9da5c7ff368bc7d41d271290deff (patch) | |
| tree | 44d5d948e3f27cc7eff15ec8cd7ee5165d9a7e90 /src/pkg/exp/iterable/array.go | |
| parent | d9dfea3ebd51cea89fef8afc6b2377c2958b24f1 (diff) | |
| download | golang-881d6064d23d9da5c7ff368bc7d41d271290deff.tar.gz | |
1) Change default gofmt default settings for
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
2nd set of files.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179067
Diffstat (limited to 'src/pkg/exp/iterable/array.go')
| -rw-r--r-- | src/pkg/exp/iterable/array.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/pkg/exp/iterable/array.go b/src/pkg/exp/iterable/array.go index 371508e5d..b5c7b5c6e 100644 --- a/src/pkg/exp/iterable/array.go +++ b/src/pkg/exp/iterable/array.go @@ -9,51 +9,51 @@ package iterable type ByteArray []byte func (a ByteArray) Iter() <-chan interface{} { - ch := make(chan interface{}); + ch := make(chan interface{}) go func() { for _, e := range a { ch <- e } - close(ch); - }(); - return ch; + close(ch) + }() + return ch } type IntArray []int func (a IntArray) Iter() <-chan interface{} { - ch := make(chan interface{}); + ch := make(chan interface{}) go func() { for _, e := range a { ch <- e } - close(ch); - }(); - return ch; + close(ch) + }() + return ch } type FloatArray []float func (a FloatArray) Iter() <-chan interface{} { - ch := make(chan interface{}); + ch := make(chan interface{}) go func() { for _, e := range a { ch <- e } - close(ch); - }(); - return ch; + close(ch) + }() + return ch } type StringArray []string func (a StringArray) Iter() <-chan interface{} { - ch := make(chan interface{}); + ch := make(chan interface{}) go func() { for _, e := range a { ch <- e } - close(ch); - }(); - return ch; + close(ch) + }() + return ch } |
