{"id":13564397,"url":"https://github.com/jfeliu007/goplantuml","last_synced_at":"2026-10-19T09:11:41.496Z","repository":{"id":37612046,"uuid":"188701937","full_name":"jfeliu007/goplantuml","owner":"jfeliu007","description":"PlantUML Class Diagram Generator for golang projects","archived":false,"fork":false,"pushed_at":"2025-10-16T20:24:01.000Z","size":866,"stargazers_count":2081,"open_issues_count":39,"forks_count":175,"subscribers_count":27,"default_branch":"master","last_synced_at":"2026-09-26T08:34:14.747Z","etag":null,"topics":["diagram","diagram-generator","go","golang","plantuml","uml-diagram"],"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/jfeliu007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-26T15:43:12.000Z","updated_at":"2026-09-26T01:01:05.000Z","dependencies_parsed_at":"2024-12-18T19:04:20.036Z","dependency_job_id":"4bab9013-b0a0-4105-b270-bc9a20414c41","html_url":"https://github.com/jfeliu007/goplantuml","commit_stats":{"total_commits":129,"total_committers":9,"mean_commits":"14.333333333333334","dds":0.3643410852713178,"last_synced_commit":"b5960c7507ea6208a0baf28762884329544b7090"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/jfeliu007/goplantuml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfeliu007%2Fgoplantuml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfeliu007%2Fgoplantuml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfeliu007%2Fgoplantuml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfeliu007%2Fgoplantuml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfeliu007","download_url":"https://codeload.github.com/jfeliu007/goplantuml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfeliu007%2Fgoplantuml/sbom","scorecard":{"id":517381,"data":{"date":"2025-08-11","repo":{"name":"github.com/jfeliu007/goplantuml","commit":"e7c93e71450476772682ebe90bb3ca15888fd890"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/automated-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 3/13 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/automated-tests.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jfeliu007/goplantuml/automated-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/automated-tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jfeliu007/goplantuml/automated-tests.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/automated-tests.yml:24","Warn: goCommand not pinned by hash: .github/workflows/automated-tests.yml:27","Warn: downloadThenRun not pinned by hash: .github/workflows/automated-tests.yml:39","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   4 goCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T02:11:04.361Z","repository_id":37612046,"created_at":"2025-08-20T02:11:04.362Z","updated_at":"2025-08-20T02:11:04.362Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38352880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"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":["diagram","diagram-generator","go","golang","plantuml","uml-diagram"],"created_at":"2024-08-01T13:01:30.684Z","updated_at":"2026-10-19T09:11:41.484Z","avatar_url":"https://github.com/jfeliu007.png","language":"Go","funding_links":[],"categories":["Code Analysis","开源类库","代码分析","Go","others","Open source library","Repositories","Libraries for creating HTTP middlewares","相关工具"],"sub_categories":["Routers","代码分析","路由器","Code Analysis"],"readme":"[![godoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/jfeliu007/goplantuml/parser) [![Go Report Card](https://goreportcard.com/badge/github.com/jfeliu007/goplantuml)](https://goreportcard.com/report/github.com/jfeliu007/goplantuml) [![codecov](https://codecov.io/gh/jfeliu007/goplantuml/branch/master/graph/badge.svg)](https://codecov.io/gh/jfeliu007/goplantuml) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![GitHub release](https://img.shields.io/github/release/jfeliu007/goplantuml.svg)](https://github.com/jfeliu007/goplantuml/releases/)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go) \n[![DUMELS Diagram](https://server.dumels.com/api/v1/badge/23ff0222-e93b-4e9f-a4ef-4d5d9b7a5c7d)](https://www.dumels.com/shdv/p/0497cfda-9623-4c02-8aea-ac040817c128) \n# GoPlantUML V2\n\nGoPlantUML is an open-source tool developed to streamline the process of generating PlantUML diagrams from Go source code. With GoPlantUML, developers can effortlessly visualize the structure and relationships within their Go projects, aiding in code comprehension and documentation. By parsing Go source code and producing PlantUML diagrams, GoPlantUML empowers developers to create clear and concise visual representations of their codebase architecture, package dependencies, and function interactions. This tool simplifies the documentation process and enhances collaboration among team members by providing a visual overview of complex Go projects. GoPlantUML is actively maintained and welcomes contributions from the Go community.\n\n## Want to try it on your code? \nTake a look at [www.dumels.com](https://www.dumels.com). We have created dumels using this library. \n\n## Code of Conduct\nPlease, review the code of conduct [here](https://github.com/jfeliu007/goplantuml/blob/master/CODE_OF_CONDUCT.md \"here\").\n\n### Prerequisites\ngolang 1.17 or above\n\n### Installing\n\n```\ngo get github.com/jfeliu007/goplantuml/parser\ngo install github.com/jfeliu007/goplantuml/cmd/goplantuml@latest\n```\n\nThis will install the command goplantuml in your GOPATH bin folder.\n\n### Usage\n\n```\ngoplantuml [-recursive] path/to/gofiles path/to/gofiles2\n```\n```\ngoplantuml [-recursive] path/to/gofiles path/to/gofiles2 \u003e diagram_file_name.puml\n```\n```\nUsage of goplantuml:\n  -aggregate-private-members\n        Show aggregations for private members. Ignored if -show-aggregations is not used.\n  -hide-connections\n        hides all connections in the diagram\n  -hide-fields\n        hides fields\n  -hide-methods\n        hides methods\n  -ignore string\n        comma separated list of folders to ignore\n  -notes string\n        Comma separated list of notes to be added to the diagram\n  -output string\n        output file path. If omitted, then this will default to standard output\n  -recursive\n        walk all directories recursively\n  -show-aggregations\n        renders public aggregations even when -hide-connections is used (do not render by default)\n  -show-aliases\n        Shows aliases even when -hide-connections is used\n  -show-compositions\n        Shows compositions even when -hide-connections is used\n  -show-connection-labels\n        Shows labels in the connections to identify the connections types (e.g. extends, implements, aggregates, alias of\n  -show-implementations\n        Shows implementations even when -hide-connections is used\n  -show-options-as-note\n        Show a note in the diagram with the none evident options ran with this CLI\n  -title string\n        Title of the generated diagram\n  -hide-private-members\n        Hides all private members (fields and methods)\n```\n\n#### Example\n```\ngoplantuml $GOPATH/src/github.com/jfeliu007/goplantuml/parser\n```\n```\n// echoes\n\n@startuml\nnamespace parser {\n    class Struct {\n        + Functions []*Function\n        + Fields []*Parameter\n        + Type string\n        + Composition []string\n        + Extends []string\n\n    }\n    class LineStringBuilder {\n        + WriteLineWithDepth(depth int, str string) \n\n    }\n    class ClassParser {\n        - structure \u003cfont color=blue\u003emap\u003c/font\u003e[string]\u003cfont color=blue\u003emap\u003c/font\u003e[string]*Struct\n        - currentPackageName string\n        - allInterfaces \u003cfont color=blue\u003emap\u003c/font\u003e[string]\u003cfont color=blue\u003estruct\u003c/font\u003e{}\n        - allStructs \u003cfont color=blue\u003emap\u003c/font\u003e[string]\u003cfont color=blue\u003estruct\u003c/font\u003e{}\n\n        - structImplementsInterface(st *Struct, inter *Struct) \n        - parsePackage(node ast.Node) \n        - parseFileDeclarations(node ast.Decl) \n        - addMethodToStruct(s *Struct, method *ast.Field) \n        - getFunction(f *ast.FuncType, name string) \n        - addFieldToStruct(s *Struct, field *ast.Field) \n        - addToComposition(s *Struct, fType string) \n        - addToExtends(s *Struct, fType string) \n        - getOrCreateStruct(name string) \n        - getStruct(structName string) \n        - getFieldType(exp ast.Expr, includePackageName bool) \n\n        + Render() \n\n    }\n    class Parameter {\n        + Name string\n        + Type string\n\n    }\n    class Function {\n        + Name string\n        + Parameters []*Parameter\n        + ReturnValues []string\n\n    }\n}\nstrings.Builder *-- parser.LineStringBuilder\n\n\n@enduml\n```\n```\ngoplantuml $GOPATH/src/github.com/jfeliu007/goplantuml/parser \u003e ClassDiagram.puml\n// Generates a file ClassDiagram.puml with the previous specifications\n```\n\nThere are two different relationships considered in goplantuml:\n- Interface implementation\n- Type Composition\n\nThe following example contains interface implementations and composition. Notice how the signature of the functions\n```golang\npackage testingsupport\n\n//MyInterface only has one method, notice the signature return value\ntype MyInterface interface {\n\tfoo() bool\n}\n\n//MyStruct1 will implement the foo() bool function so it will have an \"extends\" association with MyInterface\ntype MyStruct1 struct {\n}\n\nfunc (s1 *MyStruct1) foo() bool {\n\treturn true\n}\n\n//MyStruct2 will be directly composed of MyStruct1 so it will have a composition relationship with it\ntype MyStruct2 struct {\n\tMyStruct1\n}\n\n//MyStruct3 will have a foo() function but the return value is not a bool, so it will not have any relationship with MyInterface\ntype MyStruct3 struct {\n    Foo MyStruct1\n}\n\nfunc (s3 *MyStruct3) foo() {\n\n}\n```\nThis will be generated from the previous code\n```\n@startuml\nnamespace testingsupport {\n    interface MyInterface  {\n        - foo() bool\n\n    }\n    class MyStruct1 \u003c\u003c (S,Aquamarine) \u003e\u003e {\n        - foo() bool\n\n    }\n    class MyStruct2 \u003c\u003c (S,Aquamarine) \u003e\u003e {\n    }\n    class MyStruct3 \u003c\u003c (S,Aquamarine) \u003e\u003e {\n        - foo() \n\n        + Foo MyStruct1\n\n    }\n}\ntestingsupport.MyStruct1 *-- testingsupport.MyStruct2\n\ntestingsupport.MyInterface \u003c|-- testingsupport.MyStruct1\n\ntestingsupport.MyStruct3 o-- testingsupport.MyStruct1\n\n@enduml\n```\n\n![alt text](https://raw.githubusercontent.com/jfeliu007/goplantuml/master/example/example.png)\n\n### Diagram using www.dumels.com\n[UML Diagram](https://www.dumels.com/diagram/23ff0222-e93b-4e9f-a4ef-4d5d9b7a5c7d)\n\n### Diagram rendered in plantuml online server\n[UML Diagram](https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuSfBp4qjBaXCJbKeIIqkoSnBBoujACWlAb6evb80WioyajIYD92qRwKdd0sIX09TXRJyV0rDXQJy_1mki6Wjc4pEIImk1ceABYagJIunLB2nKT08rd4iB4tCJIpAp4lLLB2p8zaO8np6uDHWJAozN70HRGMt_7o4ms6EgUL23HyzXDUqT7KLS4WQSM5gGmIZJGrkdOOOEX5-oiUhpI4rBmKOim00)\n\nFor instructions on how to render these diagrams locally using plantuml please visit [https://plantuml.com](https://plantuml.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfeliu007%2Fgoplantuml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfeliu007%2Fgoplantuml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfeliu007%2Fgoplantuml/lists"}