@@ -39,6 +39,7 @@ github.com/KyleBanks/depth/cmd/depth
3939 ├ path
4040 ├ sort
4141 └ strings
42+ 12 dependencies (11 internal, 1 external, 0 testing).
4243```
4344
4445Or you can use a relative path, for example:
@@ -58,6 +59,7 @@ strings
5859 ├ io
5960 ├ unicode
6061 └ unicode/utf8
62+ 5 dependencies (5 internal, 0 external, 0 testing).
6163```
6264
6365Visualizing multiple packages at a time is supported by simply naming the packages you'd like to visualize:
@@ -69,12 +71,14 @@ strings
6971 ├ io
7072 ├ unicode
7173 └ unicode/utf8
74+ 5 dependencies (5 internal, 0 external, 0 testing).
7275github.com/KyleBanks/depth
7376 ├ fmt
7477 ├ go/build
7578 ├ path
7679 ├ sort
7780 └ strings
81+ 7 dependencies (7 internal, 0 external, 0 testing).
7882```
7983
8084#### ` -internal `
@@ -100,6 +104,7 @@ strings
100104 └ unsafe
101105 ├ unicode
102106 └ unicode/utf8
107+ 12 dependencies (12 internal, 0 external, 0 testing).
103108```
104109
105110#### ` -max `
@@ -117,6 +122,7 @@ github.com/KyleBanks/depth/cmd/depth
117122 ├ os
118123 ├ strings
119124 └ github.com/KyleBanks/depth
125+ 7 dependencies (6 internal, 1 external, 0 testing).
120126```
121127
122128The ` -max ` flag is particularly useful in conjunction with the ` -internal ` flag which can lead to very deep dependency trees.
@@ -140,6 +146,18 @@ strings
140146 ├ unicode
141147 ├ unicode/utf8
142148 └ unsafe
149+ 13 dependencies (13 internal, 0 external, 8 testing).
150+ ```
151+
152+ #### ` -explain target-package `
153+
154+ The ` -explain ` flag instructs ` depth ` to print import chains in which the
155+ ` target-package ` is found:
156+
157+ ``` sh
158+ $ depth -explain strings github.com/KyleBanks/depth/cmd/depth
159+ github.com/KyleBanks/depth/cmd/depth -> strings
160+ github.com/KyleBanks/depth/cmd/depth -> github.com/KyleBanks/depth -> strings
143161```
144162
145163#### ` -json `
@@ -170,18 +188,6 @@ $ depth -json github.com/KyleBanks/depth/cmd/depth
170188}
171189```
172190
173- #### ` -explain target-package `
174-
175- The ` -explain ` flag instructs ` depth ` to print import chains in which the
176- ` target-package ` is found:
177-
178- ``` sh
179- $ depth -explain strings github.com/KyleBanks/depth/cmd/depth
180- github.com/KyleBanks/depth/cmd/depth -> strings
181- github.com/KyleBanks/depth/cmd/depth -> github.com/KyleBanks/depth -> strings
182- ```
183-
184-
185191### Integrating With Your Project
186192
187193The ` depth ` package can easily be used to retrieve the dependency tree for a particular package in your own project. For example, here's how you would retrieve the dependency tree for the ` strings ` package:
0 commit comments