https://github.com/davidschlachter/embedded-struct-visualizer Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} davidschlachter / embedded-struct-visualizer Public * Notifications * Star 33 * Fork 1 * Tool to visualize the graph of embedded structs in Go projects MIT License 33 stars 1 fork Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 1 tag Code Latest commit @davidschlachter davidschlachter Add config for CI (#1) ... 74fdadf Nov 1, 2021 Add config for CI (#1) 74fdadf Git stats * 19 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Add config for CI (#1) Nov 1, 2021 .gitignore Exclude generated files from git Oct 31, 2021 LICENSE First commit Oct 29, 2021 README.md Fix typo Nov 1, 2021 go.mod Initial implementation Oct 30, 2021 graph.go Only store unique relationships Oct 31, 2021 log.go Add optional verbose logging Oct 31, 2021 main.go Update help message Nov 1, 2021 parser.go Remove log statement Nov 1, 2021 parser_test.go Fix exclusion of interface{} Nov 1, 2021 types.go Fix exclusion of interface{} Nov 1, 2021 View code Visualize a hierarchy of embedded Go structs Example Usage README.md Visualize a hierarchy of embedded Go structs This tool scans a directory of Go source code files to create a visualization of struct embedding in the project. This can be useful for navigating the data structures of complex projects, or identifying dependencies on particular structures. Example This figure would be generated from the input file below: visualizer screenshot package main import ( "time" "domain.tld/user" ) type A struct { B C map[string]D } type B struct { E, F string G user.Status Timer H } type D struct { I uint64 } type H struct { Timer time.Ticker J chan D } Usage Install: $ go install github.com/davidschlachter/ embedded-struct-visualizer@latest Or, $ git clone https://github.com/davidschlachter/embedded-struct-visualizer $ cd embedded-struct-visualizer $ go install github.com/davidschlachter/embedded-struct-visualizer Options: $ embedded-struct-visualizer -h Usage: embedded-struct-visualizer [OPTIONS] DirToScan If the directory to scan is not provided, it defaults to './' OPTIONS: -out path to output file (default: write to stdout) -v verbose logging To open a generated DOT file, you could use Graphviz or xdot. About Tool to visualize the graph of embedded structs in Go projects Resources Readme License MIT License Releases 1 tags Packages 0 No packages published Languages * Go 100.0% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.