{"id":13809168,"url":"https://github.com/gofrs/flock","last_synced_at":"2026-01-12T02:38:25.552Z","repository":{"id":1212334,"uuid":"41644111","full_name":"gofrs/flock","owner":"gofrs","description":"Thread-safe file locking library in Go","archived":false,"fork":false,"pushed_at":"2025-05-11T12:00:31.000Z","size":189,"stargazers_count":626,"open_issues_count":4,"forks_count":68,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-11T13:18:56.649Z","etag":null,"topics":["file-locking","flock","flocks","go","golang","golang-libary"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/gofrs/flock","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gofrs.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-30T21:45:35.000Z","updated_at":"2025-05-11T12:00:33.000Z","dependencies_parsed_at":"2024-09-08T13:53:43.153Z","dependency_job_id":"e49d9807-4ff0-43f1-b375-0c77bca82603","html_url":"https://github.com/gofrs/flock","commit_stats":{"total_commits":108,"total_committers":21,"mean_commits":5.142857142857143,"dds":0.5277777777777778,"last_synced_commit":"26cd8881c09b3957836915a7af5da922860d16a2"},"previous_names":["gofrs/go-flock"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fflock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fflock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fflock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fflock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gofrs","download_url":"https://codeload.github.com/gofrs/flock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969261,"owners_count":21992263,"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-locking","flock","flocks","go","golang","golang-libary"],"created_at":"2024-08-04T01:02:04.049Z","updated_at":"2026-01-12T02:38:25.547Z","avatar_url":"https://github.com/gofrs.png","language":"Go","funding_links":[],"categories":["Go","go"],"sub_categories":[],"readme":"# flock\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/gofrs/flock.svg)](https://pkg.go.dev/github.com/gofrs/flock)\n[![License](https://img.shields.io/badge/license-BSD_3--Clause-brightgreen.svg?style=flat)](https://github.com/gofrs/flock/blob/main/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/flock)](https://goreportcard.com/report/github.com/gofrs/flock)\n\n`flock` implements a thread-safe file lock.\n\nIt also includes a non-blocking `TryLock()` function to allow locking without blocking execution.\n\n## Installation\n\n```bash\ngo get -u github.com/gofrs/flock\n```\n\n## Usage\n\n```go\nimport \"github.com/gofrs/flock\"\n\nfileLock := flock.New(\"/var/lock/go-lock.lock\")\n\nlocked, err := fileLock.TryLock()\n\nif err != nil {\n\t// handle locking error\n}\n\nif locked {\n\t// do work\n\tfileLock.Unlock()\n}\n```\n\nFor more detailed usage information take a look at the package API docs on\n[GoDoc](https://pkg.go.dev/github.com/gofrs/flock).\n\n## License\n\n`flock` is released under the BSD 3-Clause License. See the [`LICENSE`](./LICENSE) file for more details.\n\n## Project History\n\nThis project was originally `github.com/theckman/go-flock`, it was transferred to Gofrs by the original author [Tim Heckman ](https://github.com/theckman).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofrs%2Fflock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgofrs%2Fflock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofrs%2Fflock/lists"}