{"id":29189746,"url":"https://github.com/damoye/gopool","last_synced_at":"2025-07-01T23:09:26.423Z","repository":{"id":57600763,"uuid":"85450080","full_name":"damoye/gopool","owner":"damoye","description":"net.Conn pool for Go","archived":false,"fork":false,"pushed_at":"2017-03-19T12:48:41.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T14:17:48.529Z","etag":null,"topics":["go","network"],"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/damoye.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":"2017-03-19T04:11:59.000Z","updated_at":"2017-03-19T12:50:17.000Z","dependencies_parsed_at":"2022-09-16T18:51:50.661Z","dependency_job_id":null,"html_url":"https://github.com/damoye/gopool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damoye/gopool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damoye%2Fgopool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damoye%2Fgopool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damoye%2Fgopool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damoye%2Fgopool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damoye","download_url":"https://codeload.github.com/damoye/gopool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damoye%2Fgopool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047679,"owners_count":23405280,"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":["go","network"],"created_at":"2025-07-01T23:09:25.732Z","updated_at":"2025-07-01T23:09:26.377Z","avatar_url":"https://github.com/damoye.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gopool\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/damoye/gopool)\n[![Build Status](https://travis-ci.org/damoye/gopool.svg?branch=master)](https://travis-ci.org/damoye/gopool)\n[![Coverage Status](https://coveralls.io/repos/github/damoye/gopool/badge.svg?branch=master)](https://coveralls.io/github/damoye/gopool?branch=master)\n\nPool is a thread safe pool for net.Conn. It can be used to manage and reuse connections.\n\n## Install and Usage\nInstall the package with:\n\n```bash\ngo get github.com/damoye/gopool\n```\n\nImport it with:\n\n```go\nimport \"github.com/damoye/gopool\"\n```\n\nand use `pool` as the package name inside the code.\n\n## Example\n```go\ndialer := func() (net.Conn, error) { return net.Dial(\"tcp\", \"127.0.0.1:4000\") }\np, err := pool.New(30, dialer)\nif err != nil {\n\tlog.Fatal(err)\n}\nconn, err := p.Get()\nif err != nil {\n\tlog.Fatal(err)\n}\n// Do something with conn\n_, err = conn.Write(\"hello world\")\nif err != nil {\n\tconn.Close()\n} else {\n\tp.Put(conn)\n}\n```\n## License\n\nThe MIT License (MIT) - see LICENSE for more details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamoye%2Fgopool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamoye%2Fgopool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamoye%2Fgopool/lists"}