package config // If the weather-station has a mapping, returns the new // name for the sensor func (ws *WeatherStation) MapSensor(sensor string) string { for name, replacement := range ws.SensorMappings { if name == sensor && replacement != "" { return replacement } } return sensor }