aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/container/vector/stringvector.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-07-12 13:51:42 -0700
committerRobert Griesemer <gri@golang.org>2010-07-12 13:51:42 -0700
commit345f9c9eb283dafb0724e0ebc53f1412e0b97dad (patch)
treed20a793947400a04761d512e2a93bb7e1d7be847 /src/pkg/container/vector/stringvector.go
parent89192ce4fefbd618d91823bd7c4deb7d45786d9c (diff)
downloadgo-345f9c9eb283dafb0724e0ebc53f1412e0b97dad.tar.xz
container/vector: remove Iter() from interface
(Iter() is almost never the right mechanism to call. Per discussion with rsc.) R=rsc CC=golang-dev https://golang.org/cl/1771043
Diffstat (limited to 'src/pkg/container/vector/stringvector.go')
-rw-r--r--src/pkg/container/vector/stringvector.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/pkg/container/vector/stringvector.go b/src/pkg/container/vector/stringvector.go
index ddc030f817..a9b727a908 100644
--- a/src/pkg/container/vector/stringvector.go
+++ b/src/pkg/container/vector/stringvector.go
@@ -199,23 +199,6 @@ func (p *StringVector) Swap(i, j int) {
}
-// Iterate over all elements; driver for range
-func (p *StringVector) iterate(c chan<- string) {
- for _, v := range *p {
- c <- v
- }
- close(c)
-}
-
-
-// Channel iterator for range.
-func (p *StringVector) Iter() <-chan string {
- c := make(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)) {