Skip to content

Commit 87dd457

Browse files
committed
Update processing implementation
1 parent 69d278f commit 87dd457

149 files changed

Lines changed: 1217 additions & 1154 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010
# Usage
1111
```shell
12-
godepvis -path examples/simple/ -dot imports.dot
12+
godepvis --path examples/simple/ --dot imports.dot
1313
dot -Tpng -o assets/example.png imports.dot
1414
```
1515

16-
![Example import graph resolved to the file level](assets/examples/simple/file.png?raw=true "Example import graph resolved to the file level")
16+
![Example import graph resolved to the file level](assets/examples/direct-circular-dependency/file.png?raw=true "Example import graph resolved to the file level")
1717

1818
Red lines indicate files causing import cycles between packages. Packages involved in a cycle have their backgrounds colored red.
1919

2020
```shell
21-
godepvis -path examples/simple/ -dot imports.dot -resolution package
21+
godepvis --path examples/simple/ --dot imports.dot --resolution package
2222
dot -Tpng -o assets/example.png imports.dot
2323
```
24-
![Example import graph resolved to the package level](assets/examples/simple/package.png?raw=true "Example import graph resolved to the package level")
24+
![Example import graph resolved to the package level](assets/examples/direct-circular-dependency/package.png?raw=true "Example import graph resolved to the package level")
2525

2626
Red lines indicate import cycles between packages.
2727

@@ -47,6 +47,6 @@ cycle:
4747
4848
...to produce the following outputs...
4949
50-
![Example import graph resolved to the file level](assets/examples/simple-config/file.png?raw=true "Example import graph resolved to the file level")
50+
![Example import graph resolved to the file level](assets/examples/simple-palette/file.png?raw=true "Example import graph resolved to the file level")
5151
52-
![Example import graph resolved to the package level](assets/examples/simple-config/package.png?raw=true "Example import graph resolved to the package level")
52+
![Example import graph resolved to the package level](assets/examples/simple-palette/package.png?raw=true "Example import graph resolved to the package level")

Taskfile.dist.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ tasks:
2525
cmds:
2626
- go build {{.LDFLAGS}} -o {{.TARGETDIR}}/{{.BIN}} ./cmd/{{.BIN}}
2727
vars:
28-
LDFLAGS: -ldflags "{{.VERSION_FLAGS}}"
28+
LDFLAGS: -ldflags "-s -w {{.VERSION_FLAGS}}"
2929

3030
debug:
3131
cmds:
3232
- go build {{.LDFLAGS}} -o {{.TARGETDIR}}/{{.BIN}} ./cmd/{{.BIN}}
3333
vars:
34-
LDFLAGS: -ldflags "-s -w {{.VERSION_FLAGS}}"
34+
LDFLAGS: -ldflags "{{.VERSION_FLAGS}}"
3535

3636
generate-examples:
3737
cmds:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
digraph {
2+
labelloc="t";
3+
label="github.com/fake/fake";
4+
rankdir="TB";
5+
node [shape="rect"];
6+
7+
subgraph "cluster_pkg_a" {
8+
label="a";
9+
style="filled";
10+
fontcolor="#ff0000";
11+
fillcolor="#ffffff";
12+
13+
"pkg_a_file_a" [label="a.go", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
14+
};
15+
16+
subgraph "cluster_pkg_b" {
17+
label="b";
18+
style="filled";
19+
fontcolor="#ff0000";
20+
fillcolor="#ffffff";
21+
22+
"pkg_b_file_b" [label="b.go", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
23+
};
24+
25+
subgraph "cluster_pkg_main" {
26+
label="main";
27+
style="filled";
28+
fontcolor="#000000";
29+
fillcolor="#ffffff";
30+
31+
"pkg_main_file_main" [label="main.go", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
32+
};
33+
34+
"pkg_a_file_a" -> "pkg_b_file__" [color="#ff0000"];
35+
"pkg_b_file_b" -> "pkg_a_file__" [color="#ff0000"];
36+
"pkg_main_file_main" -> "pkg_a_file_a" [color="#000000"];
37+
}
13.7 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
digraph {
2+
labelloc="t";
3+
label="github.com/fake/fake";
4+
rankdir="TB";
5+
node [shape="rect"];
6+
7+
"pkg_a" [label="a", style="filled", fontcolor="#ff0000", fillcolor="#ffffff"];
8+
"pkg_b" [label="b", style="filled", fontcolor="#ff0000", fillcolor="#ffffff"];
9+
"pkg_main" [label="main", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
10+
"pkg_a" -> "pkg_b" [color="#ff0000"];
11+
"pkg_b" -> "pkg_a" [color="#ff0000"];
12+
"pkg_main" -> "pkg_a" [color="#000000"];
13+
}
6.23 KB
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
digraph {
2+
labelloc="t";
3+
label="github.com/fake/fake";
4+
rankdir="TB";
5+
node [shape="rect"];
6+
7+
subgraph "cluster_pkg_a" {
8+
label="a";
9+
style="filled";
10+
fontcolor="#ff0000";
11+
fillcolor="#ffffff";
12+
13+
"pkg_a_file_a" [label="a.go", style="filled", fontcolor="#ff0000", fillcolor="#ffffff"];
14+
};
15+
16+
subgraph "cluster_pkg_b" {
17+
label="b";
18+
style="filled";
19+
fontcolor="#ff0000";
20+
fillcolor="#ffffff";
21+
22+
"pkg_b_file_b" [label="b.go", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
23+
};
24+
25+
subgraph "cluster_pkg_main" {
26+
label="main";
27+
style="filled";
28+
fontcolor="#000000";
29+
fillcolor="#ffffff";
30+
31+
"pkg_main_file_main" [label="main.go", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
32+
};
33+
34+
"pkg_a_file_a" -> "pkg_b_file__" [color="#ff0000"];
35+
"pkg_b_file_b" -> "pkg_a_file_a" [color="#ff0000"];
36+
"pkg_main_file_main" -> "pkg_a_file_a" [color="#000000"];
37+
}
11.7 KB
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
digraph {
2+
labelloc="t";
3+
label="github.com/fake/fake";
4+
rankdir="TB";
5+
node [shape="rect"];
6+
7+
"pkg_a" [label="a", style="filled", fontcolor="#ff0000", fillcolor="#ffffff"];
8+
"pkg_b" [label="b", style="filled", fontcolor="#ff0000", fillcolor="#ffffff"];
9+
"pkg_main" [label="main", style="filled", fontcolor="#000000", fillcolor="#ffffff"];
10+
"pkg_a" -> "pkg_b" [color="#ff0000"];
11+
"pkg_b" -> "pkg_a" [color="#ff0000"];
12+
"pkg_main" -> "pkg_a" [color="#000000"];
13+
}
6.23 KB
Loading

0 commit comments

Comments
 (0)