{"id":15161748,"url":"https://github.com/docker-archive-public/docker.import-restrictions","last_synced_at":"2025-09-30T15:30:52.248Z","repository":{"id":57539352,"uuid":"288462721","full_name":"docker/import-restrictions","owner":"docker","description":"Restrict imports in your go project","archived":true,"fork":false,"pushed_at":"2020-08-20T15:45:13.000Z","size":15,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-09-14T09:41:28.050Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docker.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":"2020-08-18T13:24:08.000Z","updated_at":"2024-06-10T18:25:42.000Z","dependencies_parsed_at":"2022-09-26T18:31:42.991Z","dependency_job_id":null,"html_url":"https://github.com/docker/import-restrictions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fimport-restrictions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fimport-restrictions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fimport-restrictions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker%2Fimport-restrictions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docker","download_url":"https://codeload.github.com/docker/import-restrictions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219654604,"owners_count":16522270,"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":[],"created_at":"2024-09-27T00:44:06.783Z","updated_at":"2025-09-30T15:30:51.825Z","avatar_url":"https://github.com/docker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# import-restrictions\n\nRestrict imports in your go project.\n\nThis tools helps maintainers keep dependencies clean when they have multiple packages inside the same repo that shouldn't depend on each other.\n\n## Usage\n\nBy default this tool will search for a configuration file named `import-restrictions.yaml` in the current directory, you can give it another configuration file with the flag `--configuration`.\n\n```sh\n$ import-restrictions\n$ import-restrictions --configuration my-configuration-file.yaml\n```\n\n## Configuration\n\nThe configuration file is a yaml file with an array of objects that must contain:\n\n- `dir` the base directory of the package\n- `forbiddenImports` a list of packages that are forbidden for all the packages inside `dir`.\n\nFor example:\n\n```yaml\n- dir: ./cmd\n  forbiddenImports:\n    - bytes\n    - github.com/account/repo\n```\n\nThe configuration is pretty self-explanatory, with a configuration file like the one above all the packages inside the directory `cmd` cannot import any of the `bytes` and `github.com/account/repo` packages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-archive-public%2Fdocker.import-restrictions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocker-archive-public%2Fdocker.import-restrictions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-archive-public%2Fdocker.import-restrictions/lists"}