{"id":19118771,"url":"https://github.com/derekhjray/namespace","last_synced_at":"2026-06-14T01:33:20.344Z","repository":{"id":57705864,"uuid":"500278534","full_name":"derekhjray/namespace","owner":"derekhjray","description":"A namespace executor help library, used to execute task in specified linux namespaces","archived":false,"fork":false,"pushed_at":"2023-07-28T07:06:02.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T12:27:12.703Z","etag":null,"topics":["container","namespace","setns"],"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/derekhjray.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":"2022-06-06T03:27:07.000Z","updated_at":"2022-06-06T06:04:02.000Z","dependencies_parsed_at":"2024-06-21T11:55:50.120Z","dependency_job_id":null,"html_url":"https://github.com/derekhjray/namespace","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/derekhjray/namespace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekhjray%2Fnamespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekhjray%2Fnamespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekhjray%2Fnamespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekhjray%2Fnamespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derekhjray","download_url":"https://codeload.github.com/derekhjray/namespace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekhjray%2Fnamespace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34306772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["container","namespace","setns"],"created_at":"2024-11-09T05:07:40.264Z","updated_at":"2026-06-14T01:33:20.321Z","avatar_url":"https://github.com/derekhjray.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Namespace\nA namespace executor help library, used to execute task in specified linux namespaces\n\n# Example\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"log\"\n\t\"os/exec\"\n\t\"context\"\n\t\"github.com/derekhjray/namespace\"\n)\n\nfunc ipLink(_ ...interface{}) error {\n\tvar (\n\t\tstdout bytes.Buffer\n\t)\n\n\tcmd := exec.CommandContext(context.TODO(), \"ip\", \"link\")\n\tcmd.Stdout = \u0026stdout\n\tif err := cmd.Run(); err != nil {\n\t\treturn nil\n\t}\n\n\tlog.Println(stdout.String())\n\treturn nil\n}\n\nfunc main() {\n\tns, err := namespace.New(namespace.Types(NET), namespace.Pid(2398))\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\n\terr = ns.Execute(ipLink)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n\t}\n\n\tif err = ipLink(); err != nil {\n\t\tlog.Println(err)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekhjray%2Fnamespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderekhjray%2Fnamespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekhjray%2Fnamespace/lists"}