From 650bff6aa99c07f124268069fe8e7caa538110e5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 6 Oct 2009 14:55:39 -0700 Subject: another round of gofmt applications R=gri DELTA=900 (106 added, 31 deleted, 763 changed) OCL=35384 CL=35396 --- src/pkg/container/vector/stringvector.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/pkg/container/vector/stringvector.go') diff --git a/src/pkg/container/vector/stringvector.go b/src/pkg/container/vector/stringvector.go index cda9760d24..4949d06b75 100644 --- a/src/pkg/container/vector/stringvector.go +++ b/src/pkg/container/vector/stringvector.go @@ -21,25 +21,25 @@ func (p *StringVector) Init(len int) *StringVector { // NewStringVector returns an initialized new StringVector with length at least len. func NewStringVector(len int) *StringVector { - return new(StringVector).Init(len) + return new(StringVector).Init(len); } // At returns the i'th element of the vector. func (p *StringVector) At(i int) string { - return p.Vector.At(i).(string) + return p.Vector.At(i).(string); } // Set sets the i'th element of the vector to value x. func (p *StringVector) Set(i int, x string) { - p.a[i] = x + p.a[i] = x; } // Last returns the element in the vector of highest index. func (p *StringVector) Last() string { - return p.Vector.Last().(string) + return p.Vector.Last().(string); } @@ -47,42 +47,42 @@ func (p *StringVector) Last() string { func (p *StringVector) Data() []string { arr := make([]string, p.Len()); for i, v := range p.a { - arr[i] = v.(string) + arr[i] = v.(string); } - return arr + return arr; } // Insert inserts into the vector an element of value x before // the current element at index i. func (p *StringVector) Insert(i int, x string) { - p.Vector.Insert(i, x) + p.Vector.Insert(i, x); } // InsertVector inserts into the vector the contents of the Vector // x such that the 0th element of x appears at index i after insertion. func (p *StringVector) InsertVector(i int, x *StringVector) { - p.Vector.InsertVector(i, &x.Vector) + p.Vector.InsertVector(i, &x.Vector); } // Slice returns a new StringVector by slicing the old one to extract slice [i:j]. // The elements are copied. The original vector is unchanged. func (p *StringVector) Slice(i, j int) *StringVector { - return &StringVector{ *p.Vector.Slice(i, j) }; + return &StringVector{*p.Vector.Slice(i, j)}; } // Push appends x to the end of the vector. func (p *StringVector) Push(x string) { - p.Vector.Push(x) + p.Vector.Push(x); } // Pop deletes and returns the last element of the vector. func (p *StringVector) Pop() string { - return p.Vector.Pop().(string) + return p.Vector.Pop().(string); } @@ -95,14 +95,14 @@ func (p *StringVector) AppendVector(x *StringVector) { // SortInterface support // Less returns a boolean denoting whether the i'th element is less than the j'th element. func (p *StringVector) Less(i, j int) bool { - return p.At(i) < p.At(j) + return p.At(i) < p.At(j); } // Iterate over all elements; driver for range func (p *StringVector) iterate(c chan<- string) { for _, v := range p.a { - c <- v.(string) + c <- v.(string); } close(c); } -- cgit v1.3