{"id":19298629,"url":"https://github.com/ibbd-dev/go-rotate-file","last_synced_at":"2025-07-22T13:33:51.122Z","repository":{"id":117525305,"uuid":"73271767","full_name":"ibbd-dev/go-rotate-file","owner":"ibbd-dev","description":"文件操作对象，支持自动切割。支持按小时，天，月等方式自动切割文件。","archived":false,"fork":false,"pushed_at":"2016-11-24T07:27:33.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T01:15:27.371Z","etag":null,"topics":[],"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/ibbd-dev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-09T09:59:33.000Z","updated_at":"2016-11-09T14:22:08.000Z","dependencies_parsed_at":"2024-06-19T11:29:52.296Z","dependency_job_id":"d542a9da-3fdb-4933-be83-469f54892149","html_url":"https://github.com/ibbd-dev/go-rotate-file","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ibbd-dev/go-rotate-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbd-dev%2Fgo-rotate-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbd-dev%2Fgo-rotate-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbd-dev%2Fgo-rotate-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbd-dev%2Fgo-rotate-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibbd-dev","download_url":"https://codeload.github.com/ibbd-dev/go-rotate-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibbd-dev%2Fgo-rotate-file/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266506172,"owners_count":23940019,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-09T23:08:34.737Z","updated_at":"2025-07-22T13:33:51.105Z","avatar_url":"https://github.com/ibbd-dev.png","language":"Go","readme":"# go-rotate-file\n\n文件操作对象，支持自动切割。\n\n## Install \n\n```sh\ngo get -u github.com/ibbd-dev/go-rotate-file\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"github.com/ibbd-dev/go-rotate-file\"\n)\n\nfunc TestWrite(t *testing.T) {\n\tfile := rotateFile.Open(\"/tmp/test-rotate.log\")\n\tdefer file.Close()\n\n\tfile.SetSuffix(SuffixDay) // 设置文件名后缀\n\t_, err := file.WriteString(\"hello world\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t_, err = file.WriteString(\"hello world2\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n## TODO\n\n- [ ] 增加目录不存在的检测\n- [ ] \n- [ ] \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibbd-dev%2Fgo-rotate-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibbd-dev%2Fgo-rotate-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibbd-dev%2Fgo-rotate-file/lists"}