Giter Club home page Giter Club logo

godag's Introduction

godag

godag can help you analyse the pkg internal dependency

1. How to Use

1. Install

go get -u github.com/legendtkl/godag

2. Run

godag --pkg_name=github.com/astaxie/beego --pkg_path=/Users/kltao/code/go/src/github.com/astaxie/beego --depth=1 --dot_file_path=a.dot

Flags

  • pkg_name: (REQUIRED) the package name you want to analyze dependency
  • pkg_path: (REQUIRED) the package path in your computer
  • depth: (Optional) the code depth to analyze. For example, if depth is 1, we will only analyze the pkg dag: beego/cache, beego/context; if depth is 2, we will analyze the pkgs dag: beego/cache/redis, beego/cache/ssdb etc. The default value is 1.
  • dot_file_path: (Optional) the dot file path. The default value is godag.dot in current dir.

3. Visualization

You can use graphviz to visualize dot file.

dot -Tpng godag.dot > godag.png
dot -Tsvg godag.dot > godag.svg

With beego in depth=1, we got the png as follow.

Install graphviz

Mac
brew install graphviz
Linux

yum or apt-get or source code

2. Features

  • Simple. We depend no third party package.
  • Depth Support.
  • Something else maybe.

3. Weakness

  • Support only third path package analyze. That means, if you want to analyze your local project, you might need to modify the code or contact me.

4. Contributer

Welcome to contribute.

godag's People

Contributors

legendtkl avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.