Permalink
Browse files

Merge pull request #1 from elimisteve/patch-1

Tiny suggested "improvement"
  • Loading branch information...
manuelkiessling committed Oct 5, 2012
2 parents 5d7fd64 + b349b17 commit 066846417b90126b20f8f9ca8b824f58141bc41b
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/domain/domain.go
View
@@ -49,10 +49,9 @@ func (order *Order) Add(item Item) error {
return nil
}
-func (order *Order) value() float64 {
- sum := 0.0
+func (order *Order) value() (sum float64) {
for i := range order.Items {
- sum = sum + order.Items[i].Value
+ sum += order.Items[i].Value
}
- return sum
+ return
}

0 comments on commit 0668464

Please sign in to comment.