1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-26 13:49:14 +08:00

Omit unused second value from range statements.

This commit is contained in:
Niclas Jern 2014-07-18 13:17:19 +03:00
parent fbc7df8c2c
commit daac7a278d
2 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ func (b *BaggedModel) Predict(from *base.Instances) *base.Instances {
}
// Send all the models to the workers for prediction
for i, _ := range b.Models {
for i := range b.Models {
processpipe <- i
}
close(processpipe) // Finished sending models to be predicted

View File

@ -32,7 +32,7 @@ func SortIntMap(m map[int]float64) []int {
sm.m = m
sm.s = make([]int, len(m))
i := 0
for key, _ := range m {
for key := range m {
sm.s[i] = key
i++
}
@ -62,7 +62,7 @@ func SortStringMap(m map[string]int) []string {
sm.m = m
sm.s = make([]string, len(m))
i := 0
for key, _ := range m {
for key := range m {
sm.s[i] = key
i++
}