diff options
| author | Fazlul Shahriar <fshahriar@gmail.com> | 2010-05-31 15:53:55 -0700 |
|---|---|---|
| committer | Fazlul Shahriar <fshahriar@gmail.com> | 2010-05-31 15:53:55 -0700 |
| commit | 55453a7019a59e01ecba0864822b718212aef058 (patch) | |
| tree | 178e526302b8f81c9baa0fbb84fd2828e8e9fd64 /src/pkg/container/vector/stringvector.go | |
| parent | 79b0c08ebd51a92acae1f8afcd30e98ef60e4b38 (diff) | |
| download | golang-55453a7019a59e01ecba0864822b718212aef058.tar.gz | |
vector: undo changes to autogenerated files
Also, move Do() to vector.go, so that Do() for IntVector and StringVector
is autogenerated.
The only files edited are Makefile, defs.go, and vector.go. The rest are
autogenerated with "make generate".
R=r
CC=golang-dev, hoisie
http://codereview.appspot.com/1435041
Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src/pkg/container/vector/stringvector.go')
| -rw-r--r-- | src/pkg/container/vector/stringvector.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/container/vector/stringvector.go b/src/pkg/container/vector/stringvector.go index 86563ca20..ddc030f81 100644 --- a/src/pkg/container/vector/stringvector.go +++ b/src/pkg/container/vector/stringvector.go @@ -214,3 +214,12 @@ func (p *StringVector) Iter() <-chan string { go p.iterate(c) return c } + + +// Do calls function f for each element of the vector, in order. +// The behavior of Do is undefined if f changes *p. +func (p *StringVector) Do(f func(elem string)) { + for _, e := range *p { + f(e) + } +} |
