{"id":37418346,"url":"https://github.com/gaols/tail","last_synced_at":"2026-01-16T06:03:17.273Z","repository":{"id":57639306,"uuid":"431724468","full_name":"gaols/tail","owner":"gaols","description":"go package for tailing file, just like 'tail -f'","archived":false,"fork":false,"pushed_at":"2021-11-30T22:43:57.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T21:38:20.102Z","etag":null,"topics":["golang-tail","tail","tail-f","tail-file","tailf"],"latest_commit_sha":null,"homepage":"","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/gaols.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":"2021-11-25T05:26:45.000Z","updated_at":"2021-11-30T07:05:06.000Z","dependencies_parsed_at":"2022-08-27T20:02:19.992Z","dependency_job_id":null,"html_url":"https://github.com/gaols/tail","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gaols/tail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaols%2Ftail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaols%2Ftail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaols%2Ftail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaols%2Ftail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaols","download_url":"https://codeload.github.com/gaols/tail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaols%2Ftail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":["golang-tail","tail","tail-f","tail-file","tailf"],"created_at":"2026-01-16T06:03:17.147Z","updated_at":"2026-01-16T06:03:17.267Z","avatar_url":"https://github.com/gaols.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tail\n\nTail a file programmatically just like you run shell command `tail -f /somefile`.\n\n## Features\n\n* support tail a non-exist file until that file exists\n* tail works even if file get removed or truncated\n* tail from specified offset\n\n## Basic usage\n\n```\n// closeFunc is used to stop tailing\nlineCh, closeFunc, errCh := tail.TailF(\"/path/to/file\", true)\ngo func() {\n    for {\n        select {\n        case \u003c-errCh:\n            return\n        case line := \u003c-lineCh:\n            fmt.Println(line)\n        }\n    }\n}()\n```\n\n## Advance usage\n\nby default, tail poll file delete/truncate-event every 10 seconds, you can \nconfig poll interval to satisfy your own needs.\n\n```\nlineCh, closeFunc, errCh := tail.TailWithConfig(\"/path/to/file\", true, \u0026tail.Config{PollInterval: 500 * time.Millisecond})\ngo func() {\n    for {\n        select {\n        case \u003c-errCh:\n            return\n        case line := \u003c-lineCh:\n            fmt.Println(line)\n        }\n    }\n}()\n```\n\n## More configs\n\n### config tail offset\n\n```\n// tail.SeekFromStart/tail.SeekFromEnd/tail.SeekOffsetAuto\nlineCh, closeFunc, errCh := tail.TailWithConfig(\"/path/to/file\", true, \u0026tail.Config{\n\t\tPollInterval: 500 * time.Millisecond, \n\t\tOffset: tail.SeekFromStart,\n})\n```\n\n## Limitations\n\nNot tested on windows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaols%2Ftail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaols%2Ftail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaols%2Ftail/lists"}