~emersion/hut

da8a70a6591184656f690f0ba7a0004689d1511a — Simon Ser 1 year, 10 days ago ee9502b
export: fix writeExportStamp return value
1 files changed, 2 insertions(+), 6 deletions(-)

M export.go
M export.go => export.go +2 -6
@@ 110,13 110,9 @@ func newExportCommand() *cobra.Command {
func writeExportStamp(path string, info *ExportInfo) error {
	file, err := os.Create(path)
	if err != nil {
		log.Fatalf("Failed to create export info: %s", err.Error())
		return err
	}
	defer file.Close()

	err = json.NewEncoder(file).Encode(info)
	if err != nil {
		log.Fatalf("Failed to marshal export info: %s", err.Error())
	}
	return nil
	return json.NewEncoder(file).Encode(info)
}