{"id":13613777,"url":"https://github.com/samlitowitz/goimportcycle","last_synced_at":"2025-04-13T15:33:56.764Z","repository":{"id":45151197,"uuid":"443693834","full_name":"samlitowitz/goimportcycle","owner":"samlitowitz","description":"Tooling for Go import cycles","archived":false,"fork":false,"pushed_at":"2024-07-25T03:27:59.000Z","size":1000,"stargazers_count":66,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T20:45:45.267Z","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/samlitowitz.png","metadata":{"files":{"readme":"README.markdown","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-01-02T06:01:10.000Z","updated_at":"2024-07-31T00:19:09.000Z","dependencies_parsed_at":"2024-01-04T04:22:47.541Z","dependency_job_id":"9c9ac1d2-a8e2-4631-8fdb-9564483d53e2","html_url":"https://github.com/samlitowitz/goimportcycle","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlitowitz%2Fgoimportcycle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlitowitz%2Fgoimportcycle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlitowitz%2Fgoimportcycle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlitowitz%2Fgoimportcycle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlitowitz","download_url":"https://codeload.github.com/samlitowitz/goimportcycle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223592738,"owners_count":17170552,"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-08-01T20:00:53.490Z","updated_at":"2024-11-07T21:31:37.062Z","avatar_url":"https://github.com/samlitowitz.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Go Import Cycle\n[![Go Report Card](https://goreportcard.com/badge/github.com/samlitowitz/goimportcycle)](https://goreportcard.com/report/github.com/samlitowitz/goimportcycle)\n\n`goimportcycle` is a tool to visualize Go imports resolved to the package or file level.\n\n# Installation\n`go install github.com/samlitowitz/goimportcycle/cmd/goimportcycle@v1.0.6`\n\n# Usage\n```shell\ngoimportcycle -path examples/simple/ -dot imports.dot\ndot -Tpng -o assets/example.png imports.dot\n```\n\n![Example import graph resolved to the file level](assets/examples/simple/file.png?raw=true \"Example import graph resolved to the file level\")\n\nRed lines indicate files causing import cycles between packages. Packages involved in a cycle have their backgrounds colored red.\n\n```shell\ngoimportcycle -path examples/simple/ -dot imports.dot -resolution package\ndot -Tpng -o assets/example.png imports.dot\n```\n![Example import graph resolved to the package level](assets/examples/simple/package.png?raw=true \"Example import graph resolved to the package level\")\n\nRed lines indicate import cycles between packages.\n\n## Configuration\nThe configuration file follows the JSON Schema outlined in [assets/config-schema](assets/config-schema).\n\nThe [simple-config example](examples/simple-config) uses the following schema...\n\n```yaml\npalette:\n  base:\n    packageName: \"rgb(174, 209, 230)\"\n    packageBackground: \"rgb(207, 232, 239)\"\n    fileName: \"rgb(160, 196, 226)\"\n    fileBackground: \"rgb(198, 219, 240)\"\n    importArrow: \"rgb(133, 199, 222)\"\n  cycle:\n    packageName: \"#FFB3C6\"\n    packageBackground: \"#FFE5EC\"\n    fileName: \"#FF8FAB\"\n    fileBackground: \"#FFC2D1\"\n    importArrow: \"#FB6F92\"\n```\n\n...to produce the following outputs...\n\n![Example import graph resolved to the file level](assets/examples/simple-config/file.png?raw=true \"Example import graph resolved to the file level\")\n\n![Example import graph resolved to the package level](assets/examples/simple-config/package.png?raw=true \"Example import graph resolved to the package level\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlitowitz%2Fgoimportcycle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlitowitz%2Fgoimportcycle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlitowitz%2Fgoimportcycle/lists"}