{"id":16630886,"url":"https://github.com/zmb3/goaddimport","last_synced_at":"2026-04-22T01:32:16.588Z","repository":{"id":57482413,"uuid":"99867014","full_name":"zmb3/goaddimport","owner":"zmb3","description":"Add imports to Go source files","archived":false,"fork":false,"pushed_at":"2017-08-10T01:37:09.000Z","size":2363,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T12:54:28.748Z","etag":null,"topics":[],"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/zmb3.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-08-10T01:20:56.000Z","updated_at":"2020-11-02T04:06:02.000Z","dependencies_parsed_at":"2022-09-02T04:20:13.772Z","dependency_job_id":null,"html_url":"https://github.com/zmb3/goaddimport","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmb3/goaddimport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgoaddimport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgoaddimport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgoaddimport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgoaddimport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmb3","download_url":"https://codeload.github.com/zmb3/goaddimport/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmb3%2Fgoaddimport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32117341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"ssl_error","status_checked_at":"2026-04-22T00:30:22.894Z","response_time":128,"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":"2024-10-12T04:49:48.073Z","updated_at":"2026-04-22T01:32:16.572Z","avatar_url":"https://github.com/zmb3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goaddimport\n\nA simple utility for editors to add imports to Go source files.\n\nSeveral Go editors have commands for automatically adding import statements to Go files.\nThis allows users to quickly add an import without scrolling to the top of the file\nand potentially losing context.\n\nImplementing this logic in a language other than Go can be tricky:\n\nIf the source file doesn't yet have any imports, a single line import declaration\nshould be chosen:\n\n```\nimport \"fmt\"\n```\n\nIf the source file already contains imports, a multi-line import declaration is preferred:\n\n```\nimport (\n        \"fmt\"\n        \"io\"\n)\n```\n\nAdditionally imports should be sorted, and standard library imports should be grouped\nseparately from third-party imports (a la `goimports`).\n\n`goaddimport` is a small tool that handles these cases for you.\n\n## Usage:\n\nThe tool accepts the input file on stdin and writes its output to stdout.\nIt takes a single argument - the import path that should be added.\n\n`$ goaddimport io/ioutil \u003c main.go`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmb3%2Fgoaddimport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmb3%2Fgoaddimport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmb3%2Fgoaddimport/lists"}