@@ 68,11 68,11 @@ func (e *Election) saveInfo() error {
}
raw, err := marshalElectionInfos(infos)
if err != nil {
- return fmt.Errorf("unable to marshal election info for caching: %s", err)
+ return fmt.Errorf("unable to marshal election info for cache file: %s", err)
}
err = encodeElectionsInfos(file, raw)
if err != nil {
- return fmt.Errorf("unable to encode election info for caching: %s", err)
+ return fmt.Errorf("unable to encode election info for cache file: %s", err)
}
return nil
}
@@ 105,11 105,11 @@ func loadPastElectionInfos() (ElectionInfos, error) {
defer file.Close()
raw, err := decodeElectionInfos(file)
if err != nil {
- return nil, fmt.Errorf("unable to decode election info for caching: %s", err)
+ return nil, fmt.Errorf("unable to decode election info for cache file: %s", err)
}
infos, err := unmarshalRawElectionInfos(raw)
if err != nil {
- return nil, fmt.Errorf("unable to encode election info for caching: %s", err)
+ return nil, fmt.Errorf("unable to unmarshal election info for cache file: %s", err)
}
return infos, nil
}