PKGBUILD/pkg/internal/collect/humidity.go
Markus Pesch 5220eac16b
fix: breaking changes
changes:
- remove remote operations
- add function to write measured values into a channel
- add get humidity sensors from config
- add get temperature sensors from config
- remove FileLogger
- exclude some functions from pkf into internal
2019-06-13 22:15:48 +02:00

21 lines
381 B
Go

package collect
import "github.com/volker-raschek/flucky/pkg/types"
func Humidities(humidityChannel <-chan *types.Humidity) []*types.Humidity {
humidityList := make([]*types.Humidity, 0)
for {
select {
case hum, more := <-humidityChannel:
if more {
humidityList = append(humidityList, hum)
continue
}
return nil
default:
return humidityList
}
}
}