Skip to content

elza2/go-cyclic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cyclic

Go 循环依赖检测工具

快速开始

go install github.com/elza2/go-cyclic@latest
# path 路径要设置为 go.mod 文件所在的路径.
# filter 过滤匹配的文件, 多个条件使用逗号隔开(,)
go-cyclic run --dir .path [--filter *_test.go]

运行测试

git clone https://github.com/elza2/go-cyclic.git
# path 路径要设置为 go.mod 文件所在的路径.
go run ./main.go run --dir .path [--filter *_test.go]

运行结果

# success output.
Success. Not circular dependence.

# failed output.
Failed. 1 circular dependence chains were found.

┌---→    app.go
┆          ↓
┆       routes.go
┆          ↓
└---    handler.go

About

Go 循环依赖检测工具. import cycle not allowed. cyclic dependency detection tool. go-cyclic tool.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages