{"id":22413009,"url":"https://github.com/deeper-x/filego","last_synced_at":"2025-03-27T03:24:13.581Z","repository":{"id":97569757,"uuid":"307178905","full_name":"deeper-x/filego","owner":"deeper-x","description":"file management library, with append and delete funcs","archived":false,"fork":false,"pushed_at":"2020-11-02T09:03:56.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T08:47:43.662Z","etag":null,"topics":["file","filesystem","golang-library","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deeper-x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-25T19:45:19.000Z","updated_at":"2020-11-02T09:03:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"28aac63c-133c-46d4-b014-424fac9228e3","html_url":"https://github.com/deeper-x/filego","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Ffilego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Ffilego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Ffilego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Ffilego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeper-x","download_url":"https://codeload.github.com/deeper-x/filego/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245774540,"owners_count":20669971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["file","filesystem","golang-library","logger","logging"],"created_at":"2024-12-05T14:11:36.983Z","updated_at":"2025-03-27T03:24:13.554Z","avatar_url":"https://github.com/deeper-x.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"File handling library - push, append, delete content.\n[WIP]\n\n### Rationale \nSimplifying file management, building a file instance, opening and operating on its content.\n\n#### Example\nWriting a demo log file appending IP address; then deleting all entries containing given IP\n\n```go\npackage main\n\nimport \"github.com/deeper-x/filego\"\n\nfunc main() {\n    fg := filego.New(\"./logs/access.log\")\n\n    // add lines, one by one\n    fg.WriteLine(\"Access from 100.100.100.100\")\n    fg.WriteLine(\"Access from 101.101.101.101\")\n    fg.WriteLine(\"Access from 102.102.102.102\")\n    fg.WriteLine(\"Access from 101.101.101.101\")\n    fg.WriteLine(\"Access from 102.102.102.102\")\n    fg.WriteLine(\"Access from 101.101.101.101\")\n\t\n    // Then remove all the lines containing given ip address\n    fg.DeleteLine(\"101.101.101.101\")\n}\n```\nResults:\n\n```sh\n$ cat ./logs/access.log \n100.100.100.100\n102.102.102.102\n102.102.102.102\n\n```\n\n#### Unit Test \n```sh\n~/go/src/github.com/deeper-x/filego  (master)$ make test\ngo test -v -cover ./...\n=== RUN   TestWriteLine\n--- PASS: TestWriteLine (0.00s)\n=== RUN   TestDeleteLine\n--- PASS: TestDeleteLine (0.00s)\nPASS\ncoverage: 9.8% of statements\nok  \tgithub.com/deeper-x/filego\t(cached)\tcoverage: 9.8% of statements\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeper-x%2Ffilego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeper-x%2Ffilego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeper-x%2Ffilego/lists"}