{"id":37194280,"url":"https://github.com/jarvanstack/go_utils","last_synced_at":"2026-01-14T22:35:08.007Z","repository":{"id":57586677,"uuid":"372121599","full_name":"jarvanstack/go_utils","owner":"jarvanstack","description":"my useful go utils.","archived":false,"fork":false,"pushed_at":"2023-04-08T13:35:25.000Z","size":90,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-27T22:03:02.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/jarvanstack.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}},"created_at":"2021-05-30T04:18:21.000Z","updated_at":"2023-07-27T22:03:02.071Z","dependencies_parsed_at":"2022-09-26T19:32:33.222Z","dependency_job_id":null,"html_url":"https://github.com/jarvanstack/go_utils","commit_stats":null,"previous_names":["dengjiawen8955/go_utils"],"tags_count":42,"template":null,"template_full_name":null,"purl":"pkg:github/jarvanstack/go_utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fgo_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fgo_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fgo_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fgo_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarvanstack","download_url":"https://codeload.github.com/jarvanstack/go_utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvanstack%2Fgo_utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-14T22:35:07.336Z","updated_at":"2026-01-14T22:35:07.999Z","avatar_url":"https://github.com/jarvanstack.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## go_utils\n\n### quick start\n\n```bash\ngo get -u github.com/jarvanstack/go_utils\n```\nsee the **_test file to learn how to use.\n\n### utils\n\n#### 1. testu\n[test_util](testu/) loop time +  time cost + ops (QPS)\n\nHow to use?\n```go\npackage main\nimport (\n\"github.com/jarvanstack/go_utils/test_util\"\n\"testing\"\n\"time\"\n)\nfunc Test_test_util(t *testing.T) {\n    tu := test_util.NewTestUtil(1000)\n    tu.Start()\n    for i := 0; i \u003c 1000; i++ {\n    time.Sleep(time.Millisecond)\n    }\n    tu.End()\n}\n```\n\n#### 2. throw_util\n\n[throw_util](erru) try catch the error can print stack error to help you find where is error happen.\n\n#### 3. string_util\n\n3. [string_util](stringu) (1) get random string,(2) md5 ...\n\n### 4. syscall_util \n\nexpose some unsafe pointer or fd to help you to do syscall call.\n\n```bash\nimport (\n\t\"fmt\"\n\t\"github.com/jarvanstack/go_utils/syscall_util\"\n\t\"github.com/jarvanstack/go_utils/throw_util\"\n)\n\nfunc main() {\n\tvar err error\n\tlisten, err := sysu.Listen(9999)\n\terru.Throw(err)\n\tfor {\n\t\tconn, err := listen.Accept()\n\t\terru.Throw(err)\n\t\tgo func() {\n\t\t\tdefer conn.Close()\n\t\t\tfmt.Printf(\"conn.ClientFd=%#v\\n\", conn.ClientFd)\n\t\t\tfmt.Printf(\"conn.ServerFd=%#v\\n\", conn.ServerFd)\n\t\t\tconn.Write([]byte(\"hi,syscall_util\"))\n\t\t}()\n\t}\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvanstack%2Fgo_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarvanstack%2Fgo_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvanstack%2Fgo_utils/lists"}