goimportdot

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 5 Imported by: 0

README

GoImportDot

What is GoImportDot ?

GoImportDot is a tiny tool to generate a dot file (used for Graphviz) of imports of golang package.It has two purpose.

  • Help people quickly understand how a package organization without going into details of code.
  • Help people find out whether a package is too confusing and needs to be refactored.

Quick Start

go get -u github.com/yqylovy/goimportdot
goimportdot -pkg=yourpackagename > pkg.dot 
dot -Tsvg pkg.dot >pkg.svg

Example

Install go.uber.org/zap

go get go.uber.org/zap

Get a graph of go.uber.org/zap

goimportdot -pkg=go.uber.org/zap > zap.dot
dot -Tpng zap.dot > zap.png

zap

Only get a graph of zapcore in go.uber.org/zap

goimportdot -pkg=go.uber.org/zap -root=go.uber.org/zap/zapcore > zapcore.dot
dot -Tpng zapcore.dot > zapcore.png

zap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *xcmd.Command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL