Added README

This commit is contained in:
2025-05-21 00:35:51 -04:00
parent c8c590924f
commit e922a4f794
2 changed files with 71 additions and 3 deletions

View File

@@ -54,12 +54,12 @@ func checkFile() {
}
}
func saveTodoList(todos []Todo) {
func saveTodoList(todos []Todo) error {
writeBytes, err := json.Marshal(todos)
if err != nil {
log.Fatal("There was a problem:", err)
return err
}
os.WriteFile(fileName, writeBytes, 0666)
return os.WriteFile(fileName, writeBytes, 0666)
}
func getAllTodos() []Todo {