Skip to content

Commit

Permalink
EL-001(feat): optimized code structure (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: yuanyou <[email protected]>
  • Loading branch information
elza2 and yuanyou authored Mar 15, 2023
1 parent 62e0fd8 commit fe500dd
Show file tree
Hide file tree
Showing 49 changed files with 786 additions and 599 deletions.
Empty file added Makefile
Empty file.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
go install github.com/elza2/go-cyclic@latest
# path 路径要设置为 go.mod 文件所在的路径.
# filter 过滤匹配的文件, 多个条件使用逗号隔开(,)
go-cyclic --dir .path [--filter *_test.go]
go-cyclic run --dir .path [--filter *_test.go]
```

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

运行结果
Expand Down
14 changes: 14 additions & 0 deletions action/action.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package action

import (
"github.com/urfave/cli/v2"

"github.com/elza2/go-cyclic/core"
)

func CheckCyclic(ctx *cli.Context) error {
dir := ctx.String("dir")
filter := ctx.String("filter")

return core.Do(dir, filter)
}
49 changes: 0 additions & 49 deletions cmd/cmd.go

This file was deleted.

22 changes: 0 additions & 22 deletions cmd/root.go

This file was deleted.

Loading

0 comments on commit fe500dd

Please sign in to comment.