~edwargix/tallyard

07da3635950c98b0fb81fe8f62fa0bd39757789b — David Florness 5 years ago b14fea3
Fix error messages
1 files changed, 4 insertions(+), 4 deletions(-)

M config.go
M config.go => config.go +4 -4
@@ 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
}