Gotypegraph - Generate definitions and references graph

gotypegraph

Generate definitions and references graph.

Usage

❯ gotypegraph -h
Usage of gotypegraph:
  gotypegraph [flags] -type TYPE patterns...
Flags:
  -accept.name string
        Accept objects whose name matches this.
  -accept.pkg string
        Accept packages whose name matches this.
  -deny.name string
        Deny objects whose name matches this.
  -deny.pkg string
        Deny packages whose name matches this.
  -foreign
        Search definitions in foreign packages.
  -private
        Search private definitions.
  -stat
        Generate stat graph when type is dot.
  -type string
        Output format. string, json or dot. (default "dot")
  -universe
        Search definitions in builtin packages.

Example

Use graphviz.

❯ gotypegraph ./... > /tmp/example.dot
❯ dot -Tsvg /tmp/example.dot -o img/example.svg

A gray region is a package.

An arrow is a dependency, the arrow's tail is the reference and the arrow's head is the definition.
The arrow's label is the count of the same dependency (no label means 1).

A square region in a package is a definition, func, var, etc.
In is the number of times it is referred by the other definitions.
Out is the number of times it refers the other definitions.
UniqIn is the unique In, UniqOut is the unique Out.
IO is In + Out.

Emphasized arrows and definitions have many dependencies.

On mouseover, an arrow and a definition displays additional information,
an arrow displays the tail and the head, a definition displays dependencies in lines.

Generate graph with -stat:

❯ gotypegraph -stat ./... > /tmp/example_stat.dot
❯ dot -Tsvg /tmp/example_stat.dot -o img/example_stat.svg

The graph displays dependencies aggregated by package.

Similar Resources

Pluggable Go server to generate Powerline segments

Pluggable Go server to generate Powerline segments

gowerline Because Python is hard and I've always wanted to write my segments in Go. What is this ? This is a deamon that generates and returns Powerli

Jul 25, 2022

Protoc plugin to generate contract tests for gRPC in Go

Deal - Go Introduction WE DO NOT SUPPORT THE SERVER SIDE YET This plugin allows us to write Consumer-Driver Contracts tests! Usage example Proto servi

Sep 3, 2022

Generate vulnerability data from Github API

gen-vulnerability-data-from-api Generate vulnerability data from Github API Usage Run go build && ./gen-vulnerability-data-from-api Github Username

Nov 10, 2021

A Golang protobuf plugin used to generate the necessary interfaces to interact with the database

protoc-gen-go-db-enum This protobuf compiler plugin generates the Valuer and Scanner interfaces for enums defined in the proto files. It is highly bas

Sep 9, 2022

generate protobuf for asynq payload.

protoc-gen-go-asynq generate protobuf for asynq payload. usage 1. install protoc-gen-go-asynq # first install protobuf, then install go get -d google.

Dec 22, 2021

Protoc plugin used to generate go-kit grpc code

protoc-gen-gokit-endpoint protoc plugin used to generate go-kit grpc code 安装 go install github.com/wwbweibo/protoc-gen-gokit-endpoint/cmd/protoc-gen-g

Sep 29, 2022

Protoc plugin used to generate go-kit grpc code

protoc-gen-gokit-endpoint protoc plugin used to generate go-kit grpc code 安装 go

Sep 29, 2022

generate Wireguard keypairs with a given prefix string

wireguard-vanity-address Generate Wireguard keypairs with a given prefix string. The Wireguard VPN uses Curve25519 keypairs, and displays the Base64-e

Nov 9, 2022

Generate wordlist from already collected subdomains for bruteforcing purposes.

goSubsWordlist Generate a wordlist from a list of already discovered subdomains. This list can be used for further bruteforcing for more subdomains. I

Sep 25, 2022
Related tags
A simple RPC framework with protobuf service definitions

Twirp is a framework for service-to-service communication emphasizing simplicity and minimalism. It generates routing and serialization from API defin

Jan 7, 2023
GSRPC compatible type definitions of events from the ChainBridge substrate pallet

chainbridge-substrate-events GSRPC compatible type definitions of events from the ChainBridge substrate pallet. ChainSafe Security Policy Reporting a

Nov 13, 2021
JSON-annotated protobuf definitions for NVD feeds

PROTONVD: Protobuf definitions for NVD Features: Encapsulates all fields in the NIST NVD Vulnerability JSON feeds. JSON annotations in proto definitio

Feb 17, 2022
Microsoft Graph Client Library for Go
Microsoft Graph Client Library for Go

msgraph.go v1.0 beta (The online references at pkg.go.dev above are not shown due to huge size of packages - #23) Introduction Microsoft Graph client

Dec 19, 2022
A document scanner that creates a graph of the analogy between documents.

Social Analogizer The idea is that this program scans documents for keyword that correspond to other documents. Starting point is that a user has a pr

Dec 20, 2021
Dec 13, 2022
Generate HTTP load and plot the results in real-time
Generate HTTP load and plot the results in real-time

ali A load testing tool capable of performing real-time analysis, inspired by vegeta and jplot. ali comes with an embedded terminal-based UI where you

Jan 6, 2023
Generate Server and Client side code

Additional Information Generate Server and Client side code Pre-generated stub file is included in the go project. If you need to generate the stub fi

Nov 6, 2021
Generate CRUD gRPC backends from single YAML description.
Generate CRUD gRPC backends from single YAML description.

Pike Generate CRUD gRPC backends from single YAML description. Check out Playground! Pike generates: gRPC Protobuf service description with basic Crea

Dec 23, 2022
Easily generate gRPC services in Go ⚡️
Easily generate gRPC services in Go ⚡️

Lile is a application generator (think create-react-app, rails new or django startproject) for gRPC services in Go and a set of tools/libraries. The p

Dec 27, 2022