栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Go语言

【Go学习】go-callvis安装和使用

Go语言 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【Go学习】go-callvis安装和使用

目录
  • go-callvis介绍
  • go-callvis安装
  • go-callvis使用
    • Options

go-callvis介绍

go-callvis是一种golang代码可视化工具, go-callvis
官网有很详细的解答

运行依赖:

  • Go 1.13+
  • Graphviz (optional, required only with -graphviz flag)
go-callvis安装
go get -u github.com/ofabry/go-callvis
# or
git clone https://github.com/ofabry/go-callvis.git
cd go-callvis && make install

maka无法使用
如果windows中没有gcc, 可能还需要安装MinGW-w64

go-callvis使用

example

默认打开: http://localhost:7878/

go-callvis 

go-callvis -focus github.com/syncthing/syncthing/cmd/syncthing -minlen 3 -group pkg,type -limit github.com/syncthing/syncthing -ignore github.com/syncthing/syncthing/lib/logger

github.com/syncthing/syncthing: 是包名

  1. -limit 限制在指定的包中
  2. -ignore 忽略包
  3. -minlen 3 展开的深度

官方说明

Options
Usage of go-callvis:
  -debug
    	Enable verbose log.
  -file string
    	output filename - omit to use server mode
  -cacheDir string
    	Enable caching to avoid unnecessary re-rendering.
  -focus string
    	Focus specific package using name or import path. (default "main")
  -format string
    	output file format [svg | png | jpg | ...] (default "svg")
  -graphviz
    	Use Graphviz's dot program to render images.
  -group string
    	Grouping functions by packages and/or types [pkg, type] (separated by comma) (default "pkg")
  -http string
    	HTTP service address. (default ":7878")
  -ignore string
    	Ignore package paths containing given prefixes (separated by comma)
  -include string
    	Include package paths with given prefixes (separated by comma)
  -limit string
    	Limit package paths to given prefixes (separated by comma)
  -minlen uint
    	Minimum edge length (for wider output). (default 2)
  -nodesep float
    	Minimum space between two adjacent nodes in the same rank (for taller output). (default 0.35)
  -nointer
    	Omit calls to unexported functions.
  -nostd
    	Omit calls to/from packages in standard library.
  -skipbrowser
    	Skip opening browser.
  -tags build tags
    	a list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for the go/build package
  -tests
    	Include test code.
  -version
    	Show version and exit.

Run go-callvis -h to list all supported options.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/909275.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号