{"id":43475009,"url":"https://github.com/iomodo/a-simple-undo-redo","last_synced_at":"2026-02-03T07:30:47.854Z","repository":{"id":57531767,"uuid":"188724556","full_name":"iomodo/a-simple-undo-redo","owner":"iomodo","description":"A simple undo/redo functionality in Go","archived":false,"fork":false,"pushed_at":"2019-05-26T20:22:41.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-20T00:42:28.249Z","etag":null,"topics":["go","golang","undo","undo-redo"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iomodo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-26T19:43:34.000Z","updated_at":"2022-11-22T05:58:20.000Z","dependencies_parsed_at":"2022-09-06T23:11:19.640Z","dependency_job_id":null,"html_url":"https://github.com/iomodo/a-simple-undo-redo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iomodo/a-simple-undo-redo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomodo%2Fa-simple-undo-redo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomodo%2Fa-simple-undo-redo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomodo%2Fa-simple-undo-redo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomodo%2Fa-simple-undo-redo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iomodo","download_url":"https://codeload.github.com/iomodo/a-simple-undo-redo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iomodo%2Fa-simple-undo-redo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29037441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","undo","undo-redo"],"created_at":"2026-02-03T07:30:45.607Z","updated_at":"2026-02-03T07:30:47.849Z","avatar_url":"https://github.com/iomodo.png","language":"Go","readme":"# a-simple-undo-redo\nA simple undo/redo functionality in Go\n## Interface\n~~~Go\ntype State interface{}\n\ntype Undoer interface {\n    State() State // returns the current state\n    Save(newState State) // saves the new state onto the history\n    Undo() // undos the state\n    Redo() // redos the state\n    Clear() // clears the history\n}\n~~~\n## Example\n~~~Go\n// create undoer with unlimited capacity\nundoer := NewUndoer(0)\nundoer.Save(1)\nundoer.Save(2)\nundoer.Save(3)\nundoer.Undo()\nundoer.Undo()\nundoer.State() // returns 1\nundoer.Redo()\nundoer.State() // returns 2\n~~~\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiomodo%2Fa-simple-undo-redo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiomodo%2Fa-simple-undo-redo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiomodo%2Fa-simple-undo-redo/lists"}